Yeah I was still feeling pretty motivated (I hate the word "passionate") at 28 but started to lose it in my 40s. I'm in my 50s now and want to retire but will need to wait at least until my kids are done with their educations.
You become much more cognizant of the ticking clock on your lifespan after you pass 50. You realize you have maybe 20-30 years left (which sounds like not much after you've lived 50), and you don't really get enthused about spending it learning yet another framework, language, or piece of infrastructure.