Basically just focus on staying present and not letting yourself get carried away by your internal monologue. It’s infinitely harder than it sounds. You can close your eyes, focus on a specific spot in a room, focus on your breathing, anything to keep yourself present and focused. Keep your mind empty as best you can.
The best advice I ever got was, when you have an intrusive thought during meditation, to acknowledge it, and let it fade away. Don’t focus on it or criticize yourself for it, as that will usually only make it harder to refocus yourself.
Meditation is super helpful for a lot of reasons, but for me personally it helped a lot with negative thinking and mental traps (like catastrophizing and stuff). It helps you to be more aware of when you’re getting carried away by thoughts, and how to push them aside and be present.
Look into mindfulness if you’re interested, it’s helped me a lot.