Amritsar and Shimla have the same latitudes but is more cooler than because?

Shimla is located at a higher altitude than Amritsar. As altitude increases, the temperature decreases, which is why Shimla is cooler than Amritsar.
Copyright Wanderlust World © https://www.ynyoo.com