Yes you can learn things as you get older but the bar for your achievements gets lower and lower as you age.
Let's take chess: There are no cases of a novice starting to learn at the age of 25 and becoming a grandmaster. You need to do some of that deliberate practice at an early age. I suspect the case is the same for math,programming, violin playing etc.
Interesting thread on the topic is here: https://www.chess.com/forum/view/general/who-is-the-oldest-p...
It is not just the case of kids having more time to dedicate to a skill/hobby because there are people of independent means who pursue chess at an adult age and still fail to advance.
As you get older your ability to truly master a skill declines.
That does not mean that you can't become a productive programmer at age 60 or 70.
It just means that you will not achieve Bill Joy || Fabrice Bellard || John Carmack levels of proficiency and I suppose that is ok. :)