In an ideal World, we probably wouldn’t burn fossil fuels, but if we continue to do so the best possible outcome would be to get only emissions of water vapour, carbon dioxide and nitrogen.
All of these are non-toxic and occur naturally in vast quantities, although unfortunately the first two are known to be ‘greenhouse gases’ and are therefore implicated in climate change.
Carbon dioxide is considered to be more of a threat than water vapour because it spends longer in the atmosphere before moving to the next stage of its cycle.
The only effective way to reduce emissions of carbon dioxide is to burn less fossil fuels which necessitates improving efficiency and / or replacing the fossil fuel with a renewable alternative.
The best alternative fuel from a climate change perspective is probably biomethane, which is released as organic matter (such as food or animal waste) is broken down by bacteria. Methane is itself a powerful greenhouse gas, so there is a double advantage to be gained from burning it in place of fossil fuels.