Over my whole career I can see a pattern.
Typically, I work for an employer for around 3 to 5 years. At the start of each employment I make several successful leaps, often designing and building new systems (usually single handedly). I am rewarded with various pay rises, bonuses and promotions. Then around the halfway mark or later, things sour for a variety of different reasons. Typically, I will fall out with someone senior, like my line manager. It's normally over something mundane but definitely technical.
In each cycle I try resolving things in different ways but each time I fail; then I desperately try finding a new role with the knowledge that the whole process might repeat itself.
I can recall the various reasons the fallouts occured, e.g. frustrated by a boss's crony cancelling 3rd party supplier contracts (which I had to grovel to reinstate), having differing views about testing/automation (I am fond of both), how workloads should be spread more fairly, etc. There are many different reasons.
In the more recent cycles I just end up being entirely unproductive at the end.
Is it just me?
But still, after all those years, I don't feel bad about it. That's life and life is a mess sometimes. There are things you can change and there are things you can't. And most often a change takes quite a lot of effort or leads to nothing.
You need to distance yourself from this mess. This is easier if you first and foremost take care of yourself. Lead a good life, take care of your family, do sports, do something else than think about your job all the time.
And on the job, just try your best and even if things fail, learn from them and carry on. Hope this helps a bit. Stay strong and all the best to you!