Burning fossil fuels produces carbon dioxide, a greenhouse gas. It is called a greenhouse gas because it produces a “greenhouse effect”. The greenhouse effect makes the earth warmer, just as a greenhouse is warmer than its surroundings.
Carbon dioxide is the main cause of human-induced climate change.
It stays in the atmosphere for a very long time. Other greenhouse gases, such as nitrous oxide, stay in the atmosphere for a long time. Other substances only produce short-term effects.
Not all substances produce warming. Some, like certain aerosols, can produce cooling.
Don't forget the Sun activity
https://www.spaceweatherlive.com/en/solar-activity/solar-cycle
and an exponential human population growth.
Pollution is a symptom of the problem. Human population growth is the root cause.