Deodorant masks bodily odors. Odors come from bacteria living on sweat. No sweat, no smell. No bacteria, no smell. Commercial products focusing on reducing sweat and masking the smell. The alternative approach is to reduce the number of bacteria. This can be done by washing regularly with soap and shaving off the hairs to eliminate the places where the bacteria hang out. This was ostensibly the method used by the Ancient Egyptians.
What you eat also influences the smells that comes out of you. Some say that animal products can make it worse. Also, the more liquids you ingest, the more you sweat. Some foods will make you thirstier and therefore lead to more water consuming. The main are meat and most animal products, sugar and anything salty. There is not research on this, but it is something you may easily try on yourself.
Some people also use baking soda for deodorant, pure or diluted in water. Another cheap alternative is Milk of magnesia diluted in water.
For an easy off-the-shelf solution, a lot of the "crystal" deodorant products cost just a few dollars for a solid chunk of alum and it can last more than a couple years of daily use after showering.