Why does the higher the altitude, the lower the temperature?
Theoretically, high altitudes are closer to the sun, but this distance is very small compared to the distance between the Earth and the sun. In other words, there is little difference in the amount of solar radiation that can be received at different atmospheric heights. If you don't leave the earth, you won't be able to feel the changes in solar radiation. Being at high altitude doesn't get us anywhere near the sun, let alone the temperatures.
Atmospheric pressure decreases with altitude, and there are fewer air molecules holding other molecules on top. This means that the higher the altitude, the more space the molecules in the air have to move around. This reduces the chance of collisions with surrounding molecules, spreading the kinetic energy of the molecules over a large area, thereby lowering the average temperature.
In contrast, at low altitudes, where atmospheric pressure is high and air molecules cannot move freely, they carry a lot of energy and collide with each other more frequently, causing temperatures to rise. Therefore, it is hotter at the foot of the mountain than at the top. This law of physics applies everywhere, regardless of equatorial or polar regions.
Human beings live in the lowest layer of the atmosphere, the troposphere, and cannot directly absorb shorter wavelength solar radiation. Therefore, solar radiation can almost pass through the atmosphere in the troposphere and directly contact the ground, and after some energy is reflected from the ground, the rest of the energy is absorbed by the ground, causing the temperature to rise. As the ground temperature increases, the ground emits energy like the atmosphere, and because the ground temperature is lower, the energy emitted is in longer wavelengths, primarily infrared. In the tropospheric atmosphere, surface radiation dominated by infrared rays is strongly absorbed by carbon dioxide and water vapor, thereby increasing the atmospheric temperature. Therefore, the higher the altitude, the lower the temperature, and the lower the altitude, the higher the altitude.