The worst part of software development for me is knowing that all of my work will eventually be thrown away or useless soon.
I stopped caring about my work completely. I force myself to continue because only because it pays well for the amount of time I spend on it. I make much less than SV types on here. But it's much more efficient than any alternatives I have identified so far, even though I accomplish nearly nothing essential. My current job only exists because a bureaucrat decided their government needs to invasively monitor my company's financial activity. How useful!
I only care about my family, especially my children, and the time I spend together with them chilling, cooking, playing, and learning.