They collect their data from reporting stations. Then they extrapolate “average” temperatures between stations. Years back they had the addresses of the reporting stations.
One guy went and took pictures of the reporting stations. Some were in the middle of asphalt parking lots. One was on the built up roof of a building. There were stations at the north and south end of the Andes mountains, so the temperatures of the high mountains were reported the same as the the higher temperatures at low altitudes.
There are satellites that measure surface temperatures constantly. These show earth’s temperature has been falling since 1998.
Global warming deals with surface temperatures as per NASA. Climate change is the overall narrative. The scientists had what differentiated the two. The politicians created the narratives to suit their goals.