The material of your shower may determine whether or not the wall-mountable shower speaker with a suction cup will stick to your shower. It will usually state appropriate materials in the description.
If the shower speaker and your shower walls are compatible, make sure the shower wall and suction cup have been wiped down off any particles or dust. Then get each component slightly wet, then stick together and release your grip slowly.