Here is an PodCast that goes into How to Overcome Overthinking:

Mindful focus counters overthinking’s restlessness by providing a deliberate point of attention, which can help to regulate the mind. Overthinking is characterised by a restless mind that jumps from one thought to another, or fixates on a single thought without resolution. Mindful practices, such as meditation, offer a way to direct the mind, preventing it from becoming overwhelmed by fluctuating thoughts.

To Recap: Here’s how mindful focus can be used to counter overthinking:

Choosing a Meditation Object: Instead of following the random thoughts that arise, you choose an object of focus. This could be the breath, a physical movement, or another specific thing. By focusing on this object, you are actively choosing what to put into your mind, instead of letting your mind wander.

Mindful Practice: When practicing mindful focus, the mind is “full” of what you have intentionally put into it. For example, if you choose movement as your object, you are fully aware of your actions and not leaving them to chance. This level of awareness and control is the opposite of overthinking, which is characterised by a lack of mental control

Developing Focus: Mindful practices are a form of mind exercise or mind development4. The point is not the action itself, but using the action to learn how to focus the mind45. By practising focus during meditation or other mindful activities, you develop the ability to focus at other times in your life5.