For me, that feeling of struggling to care can be an early symptom of burnout. My sustained interest in building comes from a cycle of small successes. Getting each little thing working can be a little victory. Putting it in the hands of people and seeing it benefit them, even more so. Each little victory is banking a bit of positive association for later.
But if I force myself to do the work past the point where I enjoy it, I start drawing down that positive association. That can be fine if it pays off in a larger victory later, or if I otherwise keep the balance positive. If not, eventually the work becomes joyless and then will-sapping.
I'm sure some will scoff at trying to maintain joy in the work rather than toughing it out. But I don't think toughness is enough to sustain a career in software. At this point I've changed my primary language 5 times, and I'm sure I'll do it once or twice more. And who knows how many frameworks and libraries I've had to learn over the years. To sustain that level of learning, I think we have to learn to preserve the curiosity that got us into the work in the first place.
In our early working years we strive to become successful (for some definition of success) and this drives us to work hard, learn, experiment and so on.
Typically around age 40 you will have mastered the skills, and you will be "successful". So now you need a reason to get out of bed in the morning.
A very lucky few are already in significant jobs, and this motivation switch happens naturally and without fuss.
For the rest of us it's common to see if "playing with new toys" will satisfy. Like a motor cycle, sports car or boat. Sometimes this works, but often does not.
The happiest people I personally know seem to have found significance in seeing "others" rather than themselves. Family, community, young, are all candidates for our significance. It doesn't have to change the world, but changing the world of 1 person is deeply satisfying.
Financial freedom (earning more money in less time spent) allows more freedom in chasing this significance, and more means to do so.
Starting a business can deliver financial rewards (although mostly does not) but can also be deeply satisfying in other ways. When you look at the office carpark, and realise how many staff, and families, are being provided for because of your business, well, that's a good day.
The money is just a proxy for how much value you make for people and that feels good and challenges you in ways you wouldn’t expect.
I think I'm in the same boat as the OP, and this comment resonated with me. When I started programming nearly a decade ago, I had an abundance of intrinsic motivation. I was so excited to learn about software, how to build websites, phone applications, server applications etc. That drive was a genuine passion and love for computers and software and it carried me nearly a decade in this industry through some amazing challenges. I've grown more than I could have imagined.
Yet now in my mid 30s... that passion has really dwindled. When I wake up on a Saturday, I'm not rushing to get to my computer to code. I'm more interested in relaxing, getting outside, or just doing something else. Yet in the back of my mind is a constant pressure, a constant reminder, that I should be productive.
There's always more to learn, and didn't I struggle to write that regex the other day? Didn't I want to finally dig deep into Tensor Flow? Wasn't I going to bust out the breadboard and get into some hardware design?
Why don't I feel like doing any of that now? Why is the only motivation, money?
Like the OP, the only thing that seems like it could light a fire under my ass would be some big monetary opportunity. I could get excited to build a new app, or a new server project, or website, if I knew I stood a good chance of really changing my life for the better.
I think that as the novelty of programming wore off, the only thing left was money. Initially I was motivated by wanting to understand everything. I truly didn't know how to make a phone application, and now I've made many. I didn't understand how to build and deploy a website, and now I've done that many times.
What's left? Where do I go from here? I really have more questions than answers. With another 25-30 years of "work" to do, I'm really confused about what I will do.