This is a common question, but the point is to not control your thoughts during meditation. As soon as you try to control something, you are in a state of resistance, which is sure to prolong the very thing you’re trying to stop.
The point is to realise that you are not your thoughts; you are the one watching your thoughts. Simply noticing each thought as it arises, feeling separate from it and allowing it to pass without adding anything to it will, over time, lead to a quietening of the mind.
Also focussing on a physical sensation (like the breath through your nostrils) or an external sound (e.g. the wind in the trees, or meditation music, etc) can make it a lot easier to quieten the mental chatter.
If all else fails, I might ask the mind a question to keep it busy and/or to become more grounded in the present moment, such as “what does peace feel like in my body and where do I feel it right now?”.
Hope that helps!