During a sunset, mountain peaks lose sunlight later than areas around them. From a viewer observing a mountain, a shadow can appear ascending from the base to the peak. And conversely, during a sunrise, mountain peaks get sunlight before the areas around them and a shadow can appear descending from the peak to the base.
This phenomenon occurs because the Earth is a sphere. As the altitude increases, the hours of daylight become longer. It makes the sun rise earlier and set later.