The main rule is simple: the thread should be softer and thinner than the fabric itself, otherwise it'll break and stress the fibers. For cotton, use cotton thread or universal polyester - they glide well and don't stretch out. For synthetic fabrics (spandex, polyester, knit) you need either special elastic thread or regular polyester but a softer kind. If the fabric is stretchy or viscose, specifically look for thread made for elastic materials - regular thread will snap under tension.
If you don't want to overthink it, just grab decent universal polyester thread of medium quality - it works with almost everything. Just make sure they're not cheap Chinese ones, those are often uneven in thickness. Another important thing: before sewing, test the tension on a scrap of the same fabric. If the stitch looks uneven or the thread keeps breaking, try loosening the tension or use thinner thread - often that's the problem, not the thread itself.
And one more tip from experience: if you buy your thread in one place, remember which brand works well for you personally. Every machine is different, and what works perfectly on your neighbor's sewing machine might not work on yours. So you just have to find your own option through trial and error.