I think the Doppler effect for light is easiest understood in terms of period and wavelength first.
Say you have a receiver at rest, with a source of light approaching head-on at (normalized) speed ##\beta##.
From the source's perspective, a time ##c \Delta t## elapses during the emission of a single cycle (crest to crest). That's the wave's period ##cT## in the source's rest frame: ##cT = c \Delta t##. But for light, the period ##cT## is equal to the wavelength ##\lambda##, so we actually have ##c \Delta t = \lambda##.
By time dilation, that ##c \Delta t## is equivalent to ##\gamma c \Delta t## in the receiver's frame: ##c \Delta t^\prime = \gamma c \Delta t = \gamma \lambda## (where I've designated the receiver's frame the primed frame).
So in the receiver's frame, the source emits a second wavefront a time ##c \Delta t^\prime = \gamma \lambda## after emitting the first. What we want to know is: what's the distance between the source and the first wavefront at this moment? The answer will tell us the wavelength ##\lambda^\prime## in the receiver's frame.
Well, during this time ##\gamma \lambda##, the first wavefront moves closer to the receiver a distance ##\gamma \lambda##. But the source itself also moves toward the receiver during this time, a distance ##\gamma \lambda \beta##. Thus, the first wavefront is "ahead" of the source by a distance ##\gamma \lambda - \gamma \lambda \beta## when the second wavefront is emitted:
##\lambda^\prime = \gamma \lambda ( 1 - \beta )##.
Then since wavelength and frequency ##\nu## are inversely proportional, we have:
##\nu = \gamma \nu^\prime (1 - \beta )##.
For a receding source, the minus sign becomes a plus.
For the general case, the source might not be approaching or receding head-on. Then we use only the component of the source's displacement that's parallel to the light wave's direction of propagation (as opposed to the total distance the source travels). This isn't difficult, but it involves defining an angle, and that can be done in either frame, so one must be mindful of signs and primes. IIRC, Einstein's original derivation uses the angle in the source's frame, but most other treatments I've seen use the angle in the receiver's frame. Can lead to some confusion. (Anyway, the angles are related by the aberration formula.)