Kirk was supposed to be exceptional that he was made Captain at such a young age.
...But this was never made explicit in the shows or movies. For all we know, everybody in the line officer business gets his own starship at twenty-two, and everybody also falls in love with that job and refuses promotions for the next fifty-three years when mandatory retirement hits (as per "The Counter-Clock Incident").
Okay, I'm exaggerating a bit. "Conspiracy" asserts that at 25, Tryla Scott was the youngest-ever starship captain (although we don't learn whether this means the commanding position or the four pips on the collar). But nothing in Kirk's backstory suggests he would have been that young; his command history doesn't extend beyond the second pilot (where he was in his thirties already, apparently), and there he seems to sport Commander rank on his sleeves...
Picard was around 28 when he became Captain of the Stargazer.
We never learn when Picard gained command of the
Stargazer or attained Captain rank. All we know is that he did command that ship, eventually with Captain rank, and that she was his first starship command.
The idea of Picard having commanded that old rust bucket for 22 years is an unused concept from the writers' guide. The closest this bit gets to real application is in "Tapestry", where Q confirms that Picard (at an unknown date, at unknown rank or position) heroically took command of the ship's bridge when the skipper of that time was out for the count somehow - but realistically, such a thing would not make Picard the next captain, and certainly not immediately, and happily none of the episodes suggest such a thing.
Wesley's attempts to get into Starfleet in the first two seasons of TNG also portray it as much, much harder to get in than later TNG and DS9 do.
Well, Wesley was underage for a human. He seemed to be competing in some sort of a special supergenius quota, whereas at seventeen or eighteen (the entry age quoted for several human characters, even if there's no canon mention of this being an official limit) he no doubt could have just waltzed in.
Timo Saloniemi