The radial velocity of a source relative to an observer is the component of their relative velocity along the line joining them — the rate at which the distance shrinks or grows. Only this component shifts the frequency; motion across the line of sight gives no shift at this order.
Examples
Example 23.17 (Wobbling stars: binaries and exoplanets)
When two stars orbit each other, their lines swing periodically blue and red — a spectroscopic binary, orbits measured without ever resolving the pair. A planet does the same to its star, faintly: both circle their common center of mass, so the star’s radial velocity oscillates by a few tens of — a shift . Detecting it is how the first planet around a Sun-like star was found; the weekend problem reruns that discovery, numbers and all.