Greenhouse gases are gases that transfer heat from the sun’s heat in one-way traffic. As these gases increase, they expand, causing heat to enter the Earth through the atmosphere, but they refuse to allow these radiations to leave the Earth’s atmosphere.
Greenhouse gases allow light solar radiation to enter the Earth (like the glass in a greenhouse), but they restrict the heat from leaving the atmosphere, thereby heating the Earth and cooling everything below the atmosphere.
Carbon dioxide, sulfur oxide, and methane are greenhouse gases.
Nitrogen is not a greenhouse gas because it is a diatomic molecule.