Theory:

Certain gases in the atmosphere trap the suns heat and make the earth surface warmer. Carbon dioxide (${\mathit{CO}}_{2}$), methane (${\mathit{CH}}_{4}$), nitrous oxide (${\mathit{NO}}_{2}$), hydrofluorocarbons, water vapour etc., are known as Greenhouse gases.

The increase in the percentage of greenhouse gases causing warming of the earth's temperature is known as the greenhouse effect.
The earth's atmosphere allows visible light from the sun to pass through and reach its surface. Once the sunlight heats the surface, it radiates some of its energy back to space.

The released energy is in the form of infrared radiation. This radiation is absorbed by the greenhouse gases present in the atmosphere causing it to he earth's temperature.
Fact: The average earth's temperature at surface level is about $-18\mathrm{°}C$.
The greenhouse effect occurs naturally, but greenhouse gas emissions intensify into the atmosphere due to human activities. Due to industrialisation, the atmosphere's carbon dioxide level increased by $$30 %$$, and methane level is doubled.

This greenhouse effect leads to global warming, altering the earth’s climates and altering our ecosystem's patterns.

Global warming is the rise in earths atmospheric temperature, which causes an increase in sea levels due to melting of ice glaciers, rise in droughts, changing seasonal patterns of plants and animals etc.
Afforestation helps to reduce the earth's temperature. The extraction process of fuels are dangerous, and they are non-renewable, so the alternate source of energy can be implemented. Also, the use of cleaner fuels like CNG will reduce pollution.  For example, solar energy, wind energy, etc.
Reference:
<a href="https://www.vecteezy.com/free-vector/greenhouse-effect">Greenhouse Effect Vectors by Vecteezy</a>