How to install a grab bar in a tiled shower
Studs are best
There are anchors that are quite strong. But drywall is sometimes weaker than expected. This is a special concern for a grab bar because the force is not a static weight like a mirror.
If you can mount the bar to 2 studs with long screws then you're set. If not, I would mount a piece of wood to two studs. Paint or stain to match the decor. Mount the grab bar to the wood with screws.