So light is a wave. Shorter wavelengths are bluer longer wavelengths are redder. When you walk towards a wave you hit the peaks and troughs faster than had you been still. They come slower if youโre walking away from it. The Doppler effect is that but with light waves and velocities that make it relevant
Adding to the other comments; I once saw a interesting video of a visual demonstration of that effect and other weird things that happen close to the speed of light. It was this one if i remember correctly: https://www.youtube.com/watch?v=ge_j31Yx_yk