How do astronomers quantify the relative motion of light sources precisely?

Answer

Through precise measurement of spectral lines

Shifts are determined by observing spectral lines characteristic of atoms. If these lines appear shifted to longer (red) or shorter (blue) wavelengths compared to their known rest positions in a lab, the relative motion can be quantified.

How do astronomers quantify the relative motion of light sources precisely?
astronomyuniversecosmologyblue shiftred shift