Cotton is not perfect, but it's the standard comfy material for normal life for many people. The problem is that it doesn't wick very well, so if you get it wet, it'll stay wet. So if you sweat in it, the sweat will collect.
There are better fabrics to be had. There are a variety of "technical" fibers, most of them some variant on polyester or polypropylene or nylon, that are constructed in such a way that water vapor flows through them better. With correct layering and treatments, you can also make them better at letting water vapor through but causing water to bead on top and run off. A lot of it is buried in the details. Polyester can either be really bad at letting moisture through or actually fairly good at it.
The biggest and most annoying problem with these fabrics is keeping them clean. The problem is that the same properties that make them comfortable when you are sweating in them also make them optimal for your skin bacteria to grow in. And it happens in such a way that your washer isn't always able to get both the bacteria and the stuff they feed on out. So you might pull a bike jersey out of the wash, put it on, and find yourself stinky in an hour.
They have spent some time putting anti-bacterial ingredients in the fibers. Part of the problem is that most of them either wash out.. and in the case of silver nanoparticles, can wreak havoc with the sewage treatment system... or may eventually be shown to be really bad for your skin.
Wool knit doesn't have some of these problems. It's a non-starter for the pros because you can't dye-diffusion transfer logos to it. But wool doesn't have the problem of stinking. The wool proponents claim that it's better at breathing and needs to be washed less and this and that and the other thing. But I don't care, because I can't wear wool without getting a rash. I'm allergic. And, while I'd love to get a wool jersey just to see if they were right about it, it's that uncomfortable on me, so I won't.