Have you ever considered applying your skills at non-tech companies, in some other industry or area that you're interested in? I've been coding for a few decades, but only my very first job was in pure tech. That got boring pretty quickly because the problems were so abstract and removed from real needs, and a lot of it was driven by abstract algorithms and boring business needs rather than making something useful or meaningfully better. Furthermore, there was usually a bunch of interchangeable devs so the work was piecemealed out and everybody worked on some tiny boring part instead of designing cool systems holistically.
Then I started doing the same kind of work (mostly web dev + some DB and sys admin stuff) for other sorts of organizations... worked for renewables, nonprofits, museums, legal advocacy groups, yoga studios, random individuals and small businesses, blah blah, and each one had interesting problems they were trying to solve, using a diverse mix of technologies, for relatable users. I felt like I went from a cog in an uncaring machine to a miracle worker making things happen for people who really needed it and valued my input.
Just as an example, in my current field (renewables), you can do hardware engineering, production and supply chain management, system design, marketing, graphics, mapping & GIS (geographic information systems), analytics, user experience, support engineering, and so much more. Tech isn't really the mainstay of the business (making and selling solar panels and other devices is), but programming touches everything we do in some capacity.
Other random fields that need programming: data science in any data-driven field (climate science, biology, pharmacology, academia), movies, games, robotics, drones, escape rooms, automobiles, airplanes and aeronautics, defense, agriculture, astronomy, spaceflight, architecture and building modeling... there are so many interesting problems in the world that you can work on, don't limit yourself to pure tech. Unless you really like computer science, tech is IMHO the boringest field where coding IS the focus. In other fields, coding is just a means to a much more interesting end. We're very lucky (as coders) to be able to switch verticals like that basically just by submitting a resume, without needing extensive re-schooling!
Field/vertical aside, the exact type of work/specialization that you choose to pursue also makes a HUGE difference in your day to day work life. I used to be a full-stack developer and spent way too much of my time doing boring (to me) things like managing Docker or optimizing SQL queries... turns out I vastly more enjoy UX and design, and so I learned Figma and basic UX skills and eventually became a front-end dev and love it sooooooo much more now that I never have to touch the backend again. If your tech experience is primarily limited to working within a programming language and JSON, maybe you can explore other tech-y things like UX, design, analytics, marketing, SEO, graphics (2D or 3D), music/audio, photography, game development, GIS/web maps, machine vision, whatever.
Really, you have a great foundation to branch out and go down a different path if you want to stay tech-adjacent. Or if you find a better career along the way, at least you'll get your foot in the door in that industry and maybe gradually transition from tech-adjacent to tech-rarely to tech-not-at-all and find your happiness that way. Just keep looking :)