Now a days people tends to overthink which leads to there unhappiness. There is always a chance that the things people might be thinking is never gona happen or the chance are very rare of happing.
The best way to not overthink is just by living in the present and not to worry about the things back in our past but the lessons should be learned from the past which will helps us to learn and grow properly in our life.
Even when you are getting thoughts and are unable to stop thinking about it just play with small kids you'll be completely indulged into them and your all the thoughts will be vanished within seconds.
Last but not the least stay focused and stay busy and do something productive you'll eventually overcome overthinking.