I think burning coal for power generation and using internal combustion engines fueled by gasoline (petrol) and diesel fuel could be gone by 2040, replaced improved forms of solar power and possibly Generation IV nuclear power and by 400 and 800 volt batteries with advanced battery chemistry that can be charged to full power in under 8 minutes (or even less by 2040) for motor vehicles. Getting rid of the immediate effects of exhaust emissions from coal-fired power plants and exhaust emissions from ICE cars will go a long way towards cleaning the air, especially in urban areas.
I still see a use for natural gas for power generation, since natural gas has vastly lower emissions and emission controls for burning natural gas is pretty cheap to do. And there is still a lot of natural gas available worldwide, especially now that even the OPEC states are phasing out burning off petroleum gas but processing them into clean burning natural gas for export.
Jet engines fueled by kerosene will still be around, but they will now switch to sustainable aviation fuel (SAF) derived from oil-laden algae and other fast-growing plants like hemp.