My contractor had installed 4 bathroom shelves but three of them have fallen down. These I guess require glue. Is that the problem?
Is there another way to install them so like with screws so it will never fall?
Usually those shelves are mounted to the wall structure behind the tiles, most often into one or two studs.
You need to find the studs and then drill into them for proper support.
While you should get the contractor back to sort poor work, I would hesitate as they may not know any better...
Often those shelves are mounted first then the tiles are cut to surround the shelf.
I cannot imagine how any "glue" that would hold those. But then again, you may want to inquire your local big box or hardware store and ask. Gluing right directly to polished to polished ceramic / porcelain tiles doesn't seem feasible as a practice. I would imagine if that there WAS a way to glue these like this, the surface to surface would have to be unpolished and / or ROUGH ( with small peaks & valleys prepped) to get a good bond design for surface grip strength... The other route would be either porcelain / ceramic "L" brackets or of the stainless steel type.. In which case you're going to need a special drill bit to mount them... Here's one type:
See below image / link https://www.homedepot.com/p/Dolle-FLAC-Stainless-Steel-Metal-Shelf-Bracket-for-1-4-in-5-16-in-H-Shelves-15750/204640318?cm_mmc=Shopping%7CG%7CBase%7CD59%7CMulti%7CNA%7CLIA%7CAll_Storage_LIA|71700000048022671|58700004795392476|92700041080510599&gclsrc=aw.ds&&gclid=CjwKCAjwkqPrBRA3EiwAKdtwk7j0A5TjHlsAAHyqs0uK06bJ6-HzDzd1PDt7Bi6BJtSYg_Ylrow0ZxoCTPAQAvD_BwE