you have to be under 26 on commencement of training as a Pilot/Obs.
working this back, and noting you need to be a qualified OOW first, you need to do the following:
under 26 - start training
25 - 26 - start application process, allowing a year for paperwork faff, medical(s), career manager approval (which is no means a given), CO approval, probably Flight Commander approval.
23 - 25 - start OOW assignment, get Bridge Warfare Qualification, get 1st job under your belt, get Ops Officer's approval
23 - become an OOW via IWO.
21 - 23 - become an Officer, via BFT and SFT(X) (assuming no failures etc).
by 21 - pass AIB, pass entry requirements etc etc.
And note that there is no spare time in any of that, and delivers you to flying training at the last safe moment. Note that there is a negative correlation between increasing age and likelihood of passing flying training. Also be aware, you will go back to be a PWO, but it'll be about 4 - 5 years behind your contemporaries.
Long and short of it - join up as a Pilot at 18 if you want to be a Pilot.