Light from the Sun near the horizon passes through a thicker layer of air and a larger distance in the Earth’s atmosphere before reaching our eyes.
However, light from the Sun overhead has to travel a lesser distance. At noon, the Sun appears whitish or yellowish as only little blue and violet light are scattered. However, near the horizon, most of the blue light and shorter wavelengths are scattered. Thus, the Sun appears reddish in colour during sunrise or sunset.
Hope this helps! If you have any further query you can certainly post it here.