Climate change etc. should be handled by international agreements.
If there is no competition between countries, governments tend to turn their despotic energies on their own citizens. There would be nowhere for Snowden or Assange to go. If your social credit score is ruined, it is ruined worldwide.
The military would be used to suppress the population. I'm very certain that a world government would turn into a Stalinist hell very quickly.