Speed of light is indeed constant, but it can be confusing for many, it really means that the actual speed of light does not vary, that is in vacuum, and runs at a steady pace, irrespective of the speed of other bodies travelling in space at their own different pace and direction, so relative to the source of light, the wavelength of light reaching the moving object may be different or change but the speed of light striking that object does not change.
Light can have different wavelengths, it is part of a wider electromagnetic spectrum, where different colours of light have different wavelengths.
Imagine you are in a rocket travelling at half the speed of light, and you are moving away from the source of light ( let us say it is a sun) and the rays of light that left sun travelling at SOL (speed of light) will still strike that object at SOL, despite it is moving away rapidly, the SOL did not change when it struck the object, in another example, a truck was travelling at 50mph, and a sports car doing 120mph strikes the truck from the rear, the speed of car was not 120-50 = 70mph, the fact is the speed of that car was still 120mph. The impact may be less, hence impact is the equivalent of a wavelength.
so if it was the other way around where the truck was heading towards the car still travelling at 50mph, and the car was still travelling at 120mph and both hit head on, the impact would be totally different, it would be equal to 120+50 = 170mph crash, hence why we say that speed of light is constant and only the wavelength changes as we move away or move towards the source of light.
This is how by studying the shift in its wavelength that we know if objects emitting light in the very far distance are moving away from us as the wavelength shifts and we call this a red shift, hence how we managed to figure out that the universe is expanding.
If we start seeing a blue shift it won't be very good for us, sooner or later something will be reaching us too close for our comfort! But the speed of light from those objects emitting the light does not change and remains constant.