Sewing swimwear can be tricky for several reasons. Swimwear requires stretchy fabric, specialized seams, and elastic.
Regular "straight seams" from a standard sewing machine do not work well for swimwear because the seams need to be able to stretch with the fabric without breaking, but also not be too loose that the threads will snag when un-stretched.
When sewing swimwear, I use a serger for sewing seams, and a brother 3550 cover stitch for sewing the edges, attaching the elastic, and sewing straps. The serger handles swimwear fabric very easily on default settings, but I have had a lot of trouble finding setting on the cover stitch machine that work well for swimwear fabric. Many home-sewers use a lycra/polyester blend when sewing swimwear. This type of fabric works well for children's swimwear or recreational swimsuits. However, if you are wanting to make swimwear that is durable and long-lasting for training, 100% polyester works much better. Competitive swimmers often wear 100% polyester suits for training. The issue is that many of the FAQ and troubleshooting help for sewing machine setting for swimwear use a poly/lycra blend, and the setting differ significantly when sewing with 100% polyester. I have done many hours of testing to find optimal settings for different fabric types. I have found that using even slightly different blends of textiles requires completely different settings.
When sewing a three-needle cover stitch on 90% polyester/10% lycra, I increased the stitch length to 4, used universal needles, and kept all other settings at default.
When sewing a three-needle cover stitch on 100% polyester, I used stitch length 2, upper looper threading tension 4 on all threads, presser foot tension 3, and universal needles.
Using the correct settings for the thickness and type of fabric is extremely important because using the wrong setting can cause the under-threads to bunch up and skip stitches, which can cause the entire seam to unravel.
I have read about different needle types that are recommended for stretch and swimwear fabrics. I tried both "stretch needles" and "ballpoint needles", but found that "universal needles" work best on my swimwear projects.