When I turned 30-ish and had a kid and a wife and a mortgage… I lost a metric ton of interest in computers and computing. It happens. The truth is that software is a terrible time-sink and life is much cooler. To that end, a job is a job, and if your job is to pet puppies: after 40 years of work, you’re going to hate puppies.
Try to think about what you’re doing as providing for the people you love. Don’t think that the grass is greener on some other project. Try to become a true master of your craft. Stay up to date on your skills, without chasing the new-and-shiney framework or language. If you are still interested in professional growth: become a mentor, get into project management, start a side project.
For me, I doubled down on “just” being a C++ developer. I just don’t want to climb the corporate ladder. And, should my skills ever find a dead end, so be it. But, I doubt it. I just churn the tasks at the best pace I can maintain and do my best to focus my energy towards things that actually matter.