Cotton may be breathable but it doesn't wick moisture away, so when you sweat it remains wet. This can easily lead to chafing and get uncomfortable, especially with cotton underwear.
Most synthetic fabrics, by contrast, especially polyester and bamboo, are breathable and also have good moisture-wicking properties - do the same exercise, even just running to catch a bus, in a cotton vs synthetic garment: cotton will remain damp forever.
Have you ever seen an athlete playing any kind of sports in cotton shirts and trousers? Or do they all use polyester? There's a reason for that! And you don't need to run marathons to start sweating.
Pre-covid, in the summer I used to go to the office wearing polyester, then get changed into cotton: commuting into cotton I would sweat and cotton would remain wet for most of the day, while commuting in polyester the fabric would not get damp.
I don't get why people claim that polyester makes them sweat more than cotton. The feel on the skin is subjective (cotton makes me feel clammy), the moisture-wicking properties of fabrics are not. Maybe everyone who complains buys super-cheap, poor-quality polyester? But you don't need to spend loads to get good quality synthetics : my £6 Decathlon t-shirts and my child's cheap polyester gym kit all do an excellent job.
The one thing I don't like about synthetic fabrics is the environmental impact, especially the shedding of microplastics. However, it is now easy to find clothes made of recycled polyester, plus I understand that washing clothes in laundry bags and using specific filters for the washing machine helps big time. Plus it's not like cotton has zero environmental impact, either.