I like to think that the prologue is "out-universe" from the point of view of TOS, but "in-universe" from a later point of view - the POV of the telling
of these stories.
That is, Kirk at the time of his adventures had no idea that they would last for five years. He didn't tick off days in a calendar: he just stayed out there, heroically defending the UFP ideals against bug-eyed monsters and scantily clad temptresses, until the call came to do something else.
What this "else" was, we don't know. A refit that spiraled out into a massive reworking that took years upon years and put Kirk behind a desk? A mandatory desk job for Kirk that sent the ship sailing under a different skipper? All we know is that it ended the heroic spell in the career of the Enterprise
, and justified the retroactive labeling of the heyday as "the five-year mission".