There are a lot of dust and tiny water droplets floating in the air, and sunlight is scattered in the atmosphere around the earth (air molecules are also playing a role). Violet light, indigo light and blue light with shorter wavelength scatter greatly and mix together to form a blue sky.
In the early morning and when the sun goes down, the light obliquely passes through the thick atmosphere. In such a long journey, most of the short-wavelength blue light is scattered, and the light that directly enters your eyes is sunlight without blue light. So the sun doesn't look so dazzling, but turns into a big fireball, and the color is orange.