The Doppler effect and redshift of galaxies
If a stationary source produces a wave then the observed frequency will be the same regardless of where the observer is. However if the source is moving, the observed frequency will depend on whether it is moving towards or away from you. If it is moving towards you, the observed waves will be compressed and it will appear to be a higher frequency. If the source is moving away from you then the observed frequency will be elongated and appear to be a lower than the source. This is the Doppler effect.
We know our sun contains helium because of the black lines on the spectrum where it has absorbed light. Hence the absorption spectrum of helium. So when we look at a different star we see the same absorption spectrum except the position of the lines have changed because their wavelength increased and frequency decreased causing them to shift to the red end of the spectrum (hence redshift). What astronomers are finding is that the further a star is from us, the more its light is red-shifted. This tells us that distant galaxies are moving away from us and the further it is the faster it’s moving which is strong evidence for an expanding universe.