For many years now, daily temperatures have been recorded at most places on the globe. So for most people, if they know where to look, would be able to see what daily temperatures where they live have been, going back the last 30 years, or in many cases a lot longer than that.
So establishing global warming has not been difficult. With a big enough computer, temperature data can be collected from thousands of places all over the globe, added up and averaged, and shows the average temperature of the planet is getting warmer. This is not in doubt it is simple maths.
The debate, if one can call it that, is not if the world is getting hotter, but the why. Is it just cyclical as has happened in the past, or is it man made? To attempt to answer this question, data is collected on the things man can influence, such as atmospheric gases that trap warmth from the sun, and how much of that is there because humans made it by mining and burning fossil fuels. Various types of scientific geeks collect and analyse this data, look for correlations, and do a bunch of other stuff, then attempt to determine how much of global warming is down to us.
Some big business, such as oil and coal, can do better in the short term if they can convince enough people that global warming is "fake news". Some politicians can also get better results short term by denying the need to do anything that might cost, to protect the planet. Some of them knowingly, and there are some who probably just don't get it themselves.