My loss of interest on a job is almost always the result of working with a manager I don’t like.
At my last gig the CEO who had done most technical management became a father and needed someone else to take over that; the first was an absolute disaster, an obsessive compulsive who brought endless conflict and did, literally, zero work.
The second was all buzz and BS, this is where I started hearing crap neologisms like “technical debt” and his first act on the job was to reformat some of my work to his illegible preferences. Then he lied about it. And this was in the first week.
We were a distributed group so we couldn’t do the “methodologies” but I have a feeling that were we in the same city we would have. First the front end guy quit in disgust, then I followed.
The guy was really infantile and his code was very low quality. Working for jerks is stressful, stress is painful.
I’m doing technical writing now. Learn some new skills in the meantime but writing is easy to do remotely.