what is the name for the change in a stars spectrum when it moves wawy from the earth
Some call it the "Doppler Shift", while others call it the "Red Shift"
When a source of light moves away from you, you see the characteristic lines in its spectrum move toward slightly longer wavelengths. Lines in the visible part of the spectrum move toward the red end.
When a source of light moves toward you, you see the characteristic lines in its spectrum move to slightly shorter wavelengths. Lines in the visible part of the spectrum move toward the violet end.
We see these 'shifts' when we look at the spectra of stars. "Red shift" is the change in the spectrum of a star when it's moving away from us, and "Blue shift" is the change when it's moving toward us. These measurements are the only way we have of measuring the radial motion of stars, and their speeds toward or away from us.
The whole subject of why a spectrum shifts toward longer or shorter wavelengths was explained by the Austrian physicist Christian Doppler in 1842, and it's known as the "Doppler Shift" in honor of him and his work.