It simply depends on what is most convenient for you and your bathroom layout.
If you have limited space, it might make more sense for the door to open on the opposite side of the showerhead. This way, you won’t have to worry about the door slamming into the wall or getting in the way when you’re trying to shower.
However, if you have a larger bathroom, it might be more convenient to open the door on the same side as the showerhead. Basically, it’s up to you which option is best for your needs.