I thought I was getting too old to still be interested in computers and then I discovered the Rust language, loved it, managed to shoehorn it into a project at work, and became a happy coder again. I still have the passion for code I thought I lost looong ago.
So find an interesting new tech, maybe in a new job. It may work for you.
I want to stay with Scala. I love it, enjoy it, and play with it to build some frontends (scala.js) on my own. I feel like I've been learning and improving my whole career to become the best engineer I can be, only to then not be interested in building anything.
So find an interesting new tech, maybe in a new job. It may work for you.