I've been coding since I was 11-12 years and I can remember the incredible amount of hours I was able to put in just because I was completely zoned out by the fascination of coding.
Now I'm 30 and I grew to be, at least according to market, capable (scala/backend) software engineer, but I no longer take any joy in coding. It's been around 12 years I've been coding professioanly (I had my first part time job at 15), and I can build a variety of interesting things.
My biggest problem is I can't find motivation and focus to do it. I don't enjoy work, and I'd like to WANT to build new things, just like when I was 12, but I just don't care anymore. I pretty much count down hours when I don't need to code (when does my job finish). When I finally manage to overcome exceptional effort and start coding something of my own, it's usually a lot of fun, and there are some sparkles of fun, but it never turns into fully fledged flame that I used to have.
And the next day it's the same again. For the most days I just can't overcome the lazyness to do something useful with my skills. I have balanced life, even considering corona, but overall I would just like to be fascinated by tech as I used to be, and toying with it would be something that I'd look forward to and take as a relaxation instead of something that saps the last pieces of energy that I have from work. I used to be like that, but last few years (5+) it's no more.
Any tips on how to perhpas change perspetcive, habits, or what to read, so I can enjoy the skillset that I had developed over the years rather than feel miserable?
There's a lot of comments here about focusing on yourself with meditation or hobbies or whatever. But that's just ways to survive a job you don't care about. It's a workaround.
If you spend all day training your brain to hate programming your brain will learn to hate programming. You need to change jobs. And then you will have to spend at least a year to slowly restore your brain to a working state.
It took me ~two years.
Now I'm excited about programming and has been for 8 years solid. Changed jobs again recently to keep that fire burning. There is no substitute for your job being meaningful.