As a software engineer I've been paid to build a map of the world, improve how the peace corps recruits volunteers, built the systems the Census uses to count every person in the US, ingest terabytes of data an hour to improve surgical equipment, protect the United States from biiterror, respond to the covid crisis, and now build the "world's computer" at Azure.

To do that, I spent weeks comparing one map to another to find minor issues, wrote 100s of pages of documentation I'm sure only the project lead and a lawyer read; spent a week reformatting it from bullets to tables at the managers request and then putting it back to bullets for the lawyer; spent 6 months dragging and dropping in a GUI work flow tool on a product I know exactly 2 people used; had to fly 12 hours on 3 different plans to a tiny Midwest city every other week, missing my wife and new born son every moment; write nothing but data entry forms for a year on a terrible back end and then spend another year converting those forms to a slightly different backend; have 90% of the work I did thrown out without reaching operation because two bureaucrats got into a fight; and spent an enormous part of my time trying to figure out how to configure networks when I hate networking.

Every single one of my "good" jobs that I found meaning in is because I choose to find meaning in it. I may have been doing something pointless or icky, but I actively choose to have faith that it was going to advance the larger project I'd signed up for.

Some jobs suck because of a toxic culture or individuals. I've had that happen and removing ones self from the environment is the right way to progress.

Most often though jobs, including software engineering jobs, aren't toxic, just boring some/most of the time. Often the realities of making money feel icky too. That's normal. For me though, so long as I find value in the overall thrust of what my project / company is doing I find myself relying on faith that whatever menial task I'm working on probably moves us closer to the big goals. Although I still try to make sure to eliminate pointless tasks once they've been demonstrated to be pointless.

I think you are likely depressed, but I think I read downthread you are seeing someone for that. I suspect also you need to work on identifying what you value and create priorities. It sounds like money is not a major motivator/priority right now for you. What are you motivated by? What is important to you?

It's quite possibly not in software engineering right now. My wife's team had a mechanical engineer decide they were burnt out and go work an assembly line for 4 years. They took a 30-40% paycut but we're happier. Then they got bored of that and came back to engineering. I've have college friends who decided not to use thier (expensive) degrees because they decided they wanted to do something else more and none seem to regret it, even if they could have made more money in their degree area.

Also consider working in the public sector. The work isn't necessarily any more interesting and the pay can be lower but "squeezing out profit" isn't generally what you are doing.

There is also the answer that work is just work- many people find thier fulfillment outside of paid work and just accept that they'd rather do mental drudgery in an office then physical drudgery in a warehouse, truck, or field. Even though I generally enjoy work I enjoy my family and non work passions more and have regretted everytime I choose to prioritize work over them for more than a couple days at a time.

In sum, figure out what you about, try to view work differently, and maybe try something different for work.