Advice for my 24 year old Cockatiel

I own a cockatiel (Harry) which is 24 years old (older than me!) this year and lives with my parents in my grandmas room where she takes care of him. Recently I've been seeing lots of post from parrot subreddits and how well treated all these parrots are, and it makes me feel really bad inside for Harry.

His cage is small, he doesnt have much stimulation anymore and he can barley fly anymore, I love animals especially parrots and I talked to my mom about how I'm worried for him that his cage is too small and he doesnt get enough stimulation. All that being said, hes still healthy, and doesnt seem to be in any sort of bad shape, though I'm not a parrot expert.

My mother reassured my worries saying how when he was younger he was always out and about, outside the cage and flying, having fun and being a very sweet parrot. Now that has grown old hes not as active, and prefers to be in his cage, a few years ago hes even started falling over time to time. Essentially a comparison she made is how when humans also get old they go out less and just stay in their rooms

My worry is, is she correct? Is my parrot past the prime of his life? Is it alright for him to just relax, grow old and stay in his cage for most of time in his old age?

I just wish whats best for Harry before hes inevitably gone sometime soon, as from my understanding a Cockatiel living to 24 is quite an accomplishment (again, not a parrot expert)

Any advice is appreciated, thank you