Lots of good advice here.
However, I think what's key is what is causing you to think about work. From OP's follow-up post, it's a workload issue.
That requires a clear, confident conversation with your manager about what your workload is and what support you need. It's their job to address this - but yours to raise it. I manage a team & make this clear in our one to one meetings.
If the cause of thinking outside work is due to your own personality (me! Find it really hard to separate work / home, work very hard, over-invest emotionally) or a challenging work atmosphere that may not be immediately addressable (I've had this too) then some of the strategies here are good but are personality dependent.
My job is very busy, and is challenging but at a middle management level (university teaching team). I'm fortunate to have a lot of control over my diary, and the tasks & projects I take on & I remind myself how valuable that is as a single parent.
I do a lot of exercise too - but often that has the downside of adding to my tiredness tho mentally it helps hugely.
What's helped me is working out what job satisfaction looks like for me. Because my job is busy & I manage a team, my days can be eaten up with meetings or responding to the team / reporting upwards. I found my WFH days were equally busy & the 'thinking / planning' work that I expected to get done didn't happen.
Now I go in very early straight from the gym 2 days a week, and have nearly 3 hours before most of the others are in. It's really helped. I then need to actively leave earlier so that's a work in progress - but I'm forcing myself to walk out the door, no matter what seems urgent. My job is absolutely not life & death but can feel like an endless treadmill.
I also had to recognise that sometimes I work because the home / personal pressures are harder, and work is the excuse to avoid it.
Oh, and as a chronic over-thinker, I am finally getting to a point of not caring, in the main, what others think of me.