Answer :-
Carbon dioxide and water vapour are two greenhouse gases. Greenhouse gases like water vapor, carbon dioxide, methane, and other trace gases in Earth's atmosphere absorb the longer wavelengths of outgoing infrared radiation from Earth's surface thus making the planet warmer.