The 'greenhouse effect' is not in fact the science of how GHGs affect the planet's temperature. The GHGs in effect 'trap' heat from the sun in the lower atmosphere (like a greenhouse) because GHG molecules actively heat heat energy.
Scientists say it more like a blanket effect around the earth.
They are heat radiating gases because of their atomic structure- dipole effect.
Short wave solar energy (light) passes through the atmopshere not affecting the GHGs.
Solar energy is absorbed by the solid earth surface warming it- which radiates long wave infrared (heat) energy.
This heat energy is absorbed by GHGs energizing them to (re-) radiate heat energy in all directions (they actually vibrate).
This warms the lower atmosphere which warms the surface of the planet -more.