Odour from sweat comes in three components, all with different qualities attached to them and different options to consider.
Pheromones, like androstenone, are in low concentrations usually considered quite pleasant by the opposite sex (and some others, but let's not get overly complicated here). This component should not be a problem at all, otherwise abstain from erotic thoughts or other stimulating situations.
You are what you eat and sometimes you smell like what you have eaten. Vegans have many problems, but as long as they also abstain from eating sulphur rich food like garlic, onions etc, they usually smell a lot better as the typical westerner, who is sometimes called bata-kusai in Japan (meaning butter stinker). Try to minimise eating stuff that smells offensive before you eat it! (That is according to the question as asked. In real life I'd say life-hackishly: stop worrying about that, offer others cheese and garlic instead.)
Bacteria are feasting on anything that comes out of your glands. That cannot be entirely prevented, but taking a shower once in a day is usually enough to dilute the results of their metabolism to be virtually unnoticeable. After three days without cleaning however things will get quite intense for most humans.
There is, however, an apparently nice option for Americans to consider: a recent product on the market, which I will not advertise here, claims to not replace but counterbalance the microbiome in your underarm pit with pre- and pro-biotics that eat your sweat and what the other odour producing bacteria excrete.
Being just a product to buy, that's not a real life-hack. That would be replicating what the inverntors of those products did: find spot where horses take a mud bath and do likewise, regularly for time.
Killing all bacteria on your skin is usually a very bad idea, only encouraging the re-colonisation with nasty and unwanted ones.
Since this is tagged with "clothing":
You might just starve the bacteria by wicking away the sweat rapidly (using natural fibres like cotton or wool, avoid synthetic fibres like polyester at all cost if any type of odour is of concern).
If you do want to stump their metabolism, go for the old advice from the Roman Pliny and use Alum-sticks:
It has the effect, also, of checking and dispersing perspiration, and of neutralizing offensive odours of the arm-pits. (very bowdlerised translation)
A real life hack in the sense of "thinking outside of the box" is:
if you are concerned with how your armpits smell, start to look at your feet!
That does not only mean to not only wash your armpits but also your feet. It means to entertain the idea that Your feet not only can taste things like garlic. Your feet can pick up an amazing variety of odours and distribute them throughout our body, ending up in so interesting places that there are quite a number of pretty tasteless youtube videos out there to illustrate the phenomenon. But since we want to improve things instead of entertaining teenagers, use something smelling nice as an inlay sole for your shoes. Cinnamon is a popular thing for exactly this kind of application in Vietnam. Cinnamon soles are a commercial product (so no links) but these kind of soles might be made at home with a variety of ingredients, producing a small but nice effect.