Get swim bottoms with silicone grippers and moderate coverage.
Look for bottoms with silicone grippers along the leg openings or built-in shorts.
String bikinis and tiny triangle cuts ride up because there’s nothing holding them in place against your skin. The friction that keeps them put during walking disappears once you start swimming. Silicone strips add grip. Ruching (gathered fabric) also helps because it creates tension that keeps the fabric from sliding.
If you really want to swim laps or do more than stand in the water, consider a one-piece or a high-waisted bottom with a wider leg opening and more coverage. Boardshorts or swim skorts work too.
A rash guard over your bikini isn’t a bad look either.
