I’ll come to your core question in a moment. To restate the basic picture:
If a sound or light source is moving toward you, you receive wave crests and troughs more frequently than you would if the source were at rest relative to you, since each subsequent crest or trough has been given a “head start” by the motion of the source. This is standard Doppler blueshift. Switching the motion to be “away from you” leads to a redshift instead.
Separately, if the source is moving fast enough relative to you, relativistic time dilation of the source may also be important. This is not unique to light sources, though that’s where you usually hear about it.
A situation in which the latter effect is noteworthy is when a distant source is moving across one’s field of view (rather than toward or away). The first type of effect (mundane Doppler) does not occur for such transverse motion, but the latter effect (time dilation) continues to apply in that case.
However, keeping to the straight toward/away case, you are (correctly!) noting that a source moving toward you will have clocks that appear to be running faster, contrary to the standard language of time dilation (which says moving clocks run slower.) Indeed, the apparent clock speed will match whatever blueshifting is going on. I believe your question here is, “So, what gives?”
It’s the distinction between asking about their clocks when you are local to them vs. when you are far away and observing the clocks via a propagating signal sent at some point in the past.
We can set up a purely local clock-measuring scenario. Imagine we are watching a ship directly approaching us. The ship will pass our location 12 months from now. We have previously arranged with a friend stationed closer to the ship – 6 months out instead of 12 months – to also keep an eye on the ship. My friend and I are stationary to one another, so we are in the same reference frame. He is just facilitating my ability to measure things at different locations in this reference frame. We have previously synchronized our clocks* so that we can compare notes later.
Right when the ship passes by my friend, he takes a photo that shows his clock and the ship’s clock in the same shot. When the ship passes me, I do the same. When we compare notes later, we see that our own clocks elapsed by 6 months between the ship encounters / photos while the ship clock elapsed by something less than 6 months. The moving clock is seen as having run more slowly. This is time dilation at its heart.
But wait! The ship captain can take the same sorts of photos during the two encounters, and her photos must show the same clock faces as shown in our photos. Heck, maybe even her photos are each taken a split-second later than ours so that she captures her clock, our clock, and our freshly taken photo already visible on our phone’s screen. All this local evidence must match. Wouldn’t the captain, therefore, conclude that our clocks (which are moving according to her) are advancing faster?
Perhaps surprisingly, no. She will indeed see our two clocks differing by 6 months between the two encounters, but she will also see that our clocks were never synchronized to begin with. An important consequence of relativity is that simultaneity depends on reference frame. So when we originally sync’d up our clocks through some concrete actions so that they simultaneously read zero (say), those actions would not lead to simultaneous zeros in the ship reference frame. The 6-month difference seen on the clocks needs the synchronization offset taken into consideration before the captain can infer anything about the clocks’ rates. And that offset is precisely the amount needed for the captain to correctly infer that our clocks appear to run slowly for her, as they should and by the same factor that we see for her clocks.
Taking a step back, relativity relates to spacetime, so space and time must always be considered together. The simplest statements of time dilation apply to cases where the “space” part of the problem can be factored out. In the above example, we did that by having two observers who can each make local observations of the ship’s clock to make a direct statement about how fast it it ticking. That doesn’t help us for the captain’s perspective, as the captain needs to consider how two spatially separated and moving clocks relate to one another – an inherently non-local question. And it also doesn’t help when we are watching a distant ship moving at us – also inherently non-local (and with a physical separation that is changing with time).
The seemingly separate effects (time dilation, length contraction, relativity of simultaneity, etc.) all come together elegantly via the Lorentz transformation, which converts spacetime-dependent observations in one frame into another frame without needing to juggle any artificially separated time or space consequences. But talking about “time dilation” on its own is certainly useful in many applications, so long as one is careful.
*In principle, one must show that a synchronization scheme is well-defined. (It is.)