But it all starts with good cleaning maintenance. I'm fortunate in that without cologne or deodorant, I usually don't stink even when working out. Cleanliness is certainly key.
Body chemistry is another individual variable. I never had odor as a kid, no matter how much I would sweat. But one day in gym class, at 14, I realized my underarms positively reeked. I was shocked, I'd never smelled anything like that on me before.
I quickly investigated underarm deodorants, which I had never used, and that solved the problem. I had always showered regularly, but as I became an adult my body chemistry, including hormones, was changing, promoting body odors I never had previously. And I had to adapt to that. I still need to shower often and use deodorant to control the problem, but at least it's manageable.