Deblad life is tough I guess. I have no great response. I too hate my job. I think a big part of it is that our generation was raised being told we can work someday doing what we love. And that's just a lie. You CAN, but determining what that is, and having the drive/ self motivation to get there is probably the hardest.
I'd suggest reading some self help books that talk about goals, motivation, etc. You just need to spend some time alone without distractions, and really self evaluate yourself, your choices, and where you want to be. Try to figure out what you want to be doing everyday, what you need to work on to be eligible for that, and the steps necessary to get there. Then map out some goals to accompany those steps.
I've realized that setting goals to push for is so incredibly important. It's what got me through engineering. Granted, you've got to find the drive inside you to push through that, and I don't know any advice on finding that drive. But I've since realized now that I'm in the working world on the 9-5 grind, part of the reason I'm unhappy is that I have no goal to push for anymore. It's just a seemingly infinite cycle of get up, go to work, come home, repeat. So I've decided to set some goals outside of my job, such as: learning a computer language, reading a certain amount, relaxing for x amount of time, refresh myself on skills learned in college (to make me more appealing at interviews), etc. At my work I try to set weekly goals of some project I want to try to get done, and a long term goal for my project. I also try to think about where I want to be in that company, and try to behave and take actions that I believe would demonstrate my ability for that position.
I'm sorry for the rambling, but I figured I'd lay it all out there and maybe you can glean some information that you can relate with. There is some Stat that 70% of Americans are unhappy with their job. So you're not alone. Regarding the difficulty of school, you've got to set some goal or create a strong reason why you want to succeed so you can always push yourself with that goal in mind. Remember that if you get a degree in stem, you don't necessarily have to to that exact thing you studied for. A stem degree proves that you're motivated and capable of learning complex skills, so you'll be marketable in other stem fields as well.
You might also consider finding a hobby to give yourself a break. When I was in school it was gaming, but that could lead to not getting my hw done.... I also enjoyed snowboarding and hiking. For me, my brain resets when I go for a walk out in the woods. No internet no texting, just disconnect and reset. I've only had a smart phone since 2016. I've already noticed some negative impacts of having constant access to the internet. Reddit in particular, so toxic. That's why I'm here! Lol.
Again sorry for my rambling, but hopefully somewhere in all the crap I've said, you find something useful. Good luck.