Nearly 200 countries have agreed to transition away from fossil fuels to avert an incoming climate catastrophe. The deal was struck at COP28 climate summit in Dubai.