I eventually found clarity by focusing on what I'd want to do if money was not an option & it helped me identify where my true passions were -- some were within tech & some were outside of tech, and it helped me make good choices about how to try and spend my time. Unfortunately there will not necessarily be a perfect way to make money at these things, but it can at least inform the direction you should work toward long-term. You've listed a couple of areas of interest, and so if you'd like to pursue those, try to make space in your life to always be working on problems in those spaces at least part of the time. But if your real interests are all outside of tech -- it's okay to leave tech. You ultimately don't want to be stuck in an industry that you don't really care about.
One other area that might be something to consider, which is something I got involved with after I left my job: conducting technical interviews. It's a great mix of getting to interact with real people, while still leveraging your technical skills (and usually remote, which is a big perk). The kinds of questions involved in the classical technical interview usually cater to people with strong algorithm & data structures knowledge, but are super learnable for anyone with not a lot of experience with those particular topics as long as you've got solid coding skills.
If you (or anyone else reading this) would be interested in chatting a bit more about that space in particular, I'm always excited to share more details about it -- it was a really positive experience for me to discover that world. My contact info is in my profile.