@mi cotton is unusually good at absorbing water. it carries up to 20× its weight in water. that makes for amazing towels, and it's also great in the desert daytime or other situations where it's both very hot and very dry, as you can wet it and the slow evaporation will cool you.
unfortunately, everywhere else where the humidity is even moderate, that makes it very nonfunctional. in heat it will soak up your sweat and stay, moist, forever, and, ever. that prevents your sweat from evaporating, and it's the evaporation that cools you down, not the sweating per se. it short-circuits the very efficient cooling system that human bodies have developed. this is why when you change from a cotton shirt to linen, hemp, ramie, nettle etc. it suddenly feels so much fresher and breezier.
the thicker the cotton, the more water it absorbs, and the closer to your body, the less chance you have to develop an "air cushion" microclimate that insulates you from the sun heat. this is why going out in (real) summer with denim pants and a black band T-shirt feels like suicide. the air cushion thing is how traditional hats operate—the reason why putting on a hat feel fresh even though you have felt or leather on your head is that hats are designed to leave an empty space bubble above your head.
so: loose clothing (for air insulation), made of either sports synthetics or basically any natural fibre except cotton (to allow transpiration evaporation), covering your entire body (to protect your skin from the sun).
(cotton is also nonfunctional in the cold. I think hikers are exxagerating a bit when they say "cotton kills", but it will definitely increase your risk of hypothermia if you get wet in cold weather, for the same reasons. this happens easily in Europe even in summer, if you're in the woods at night; one windy rainstorm and suddenly a cozy warm camping night becomes a life risk.)
(this also means that underwear made of non-cotton natural fibres would be more hygienic and less likely to lead to micosis and stuff, but sadly that's very hard to find.)
the one advantage of cotton is that it makes so much fibre that it's cheaper. this is doubled down by an industry that has geared itself to cotton, which means linen and the others have become niche markets, therefore premium/expensive. which is a shame also because linen is native to Europe and good for the environment/insects/etc., unlike cotton agriculture which has grown to be very intensive. so I tend to prefer linen whenever I can. because it's too expensive, a lot of my wardrobe is linen pieces I got by lurking on Vinted, Kleinanzeigen and Ebay and watching "100% linen" + my sizes, and then I adapt my style to fit whatever sorta clothing I find for cheap. when I had money to burn on fashion i would sometimes also get pieces from Uniqlo which always have amazing linen pieces for summer (I still often use my black overalls I got years ago, and the pink summer blazer that's from before transition).