ancient hindus identified this problem ages ago and started burning dead bodies
they even burned dead animals and birds
epic book Ramayan has an episode where jatayu (eagle species) which was killed by raavan was burned later by Raam.
also burning os good because, if the dead had some diseases in their body, those bacteria and virus also will be burned into ashes and then useful for earth and sea.
if you bury them, those germs will still be alive and spread through soil
buddists realised this and started burning dead bodies