Unfortunately I don't have any answers but as the other responses point out software is a gilded cage because it would be very hard to get anywhere near an equivalent salary doing anything else.
I had become increasingly disillusioned with software, mainly the maddening bureaucracy, problematic management and lack of teamwork over my previous two jobs. But I also had something of an existential crisis when I realised I think that so much of what we do is just rewriting or updating apps to use the new hot tech in order to have something to do. I feel like so much of what's exciting people at the moment are solutions in search of problems, if StackOverflow can run on a few servers to serve an incredibly high traffic site why do we need k8s and serverless and firebase and microservices and kafka and whatever else (granted I have no idea what most of these things are or do)? Why in the name of God do I need an entire build pipeline and SPA framework to deliver some static HTML to users? I feel like Rust is interesting and potentially worthwhile but I don't have much interest in the domain of problems Rust excels at. Granted all this is coloured by the burnout I'm recovering from.
I think I will probably end up going back to software, maybe as a contractor, but I'm tempted to try something new. My belief is that it would be easier to do something socially meaningful in another field but even in scientific research most work is pointless and the reward/funding system is entirely dysfunctional.