in the last 200 years humans have vastly increased the amount of greenhouse gases in the atmosphere
the suns energy warms earth and it’s atmosphere
the suns heat energy warms the ground and is remitted back into the atmosphere where it can escape to space
on the way back the carbon dioxide molecules absorb some heat
the co2 molecules re emit the heat energy in all directions meaning that some heat energy escapes to space whereas some bounces back to earth causing the atmosphere to warm up