Grounding is simply going inside yourself and getting yourself into a safe place mentally and emotionally. I personally take a deep diaphragmatic breath x3 and give thought to my favorite place, real or imagined. A place I have been or have always wanted to go or a place that isn’t real but I’ve made up in my mind. I put myself quietly into a body scan. Once you're well practiced in this, you can do it in seconds and without notice. It’s great when under sudden anxiety or doing a presentation because even in public, you can go inside and calm without outside notice.
It requires time. Practice makes perfect. Start small, with a 5 minute meditation practice or even less. Every time you catch your mind wandering far, bring your attention back to the moment. Do it with compassion, your are just learning. The more you do it the less your mind will wander. Continue practicing and try to hold longer sessions, 6 mins, 7 mins, 10 mins and so on. To keep yourself grounded, try to say in your mind "IN" every time you breath in,and "OUT" every time you breath out, for the first minutes of the session.
Allow and accept that you’ve wondered off, always result in coming back to focusing on the breath. Coming back to the breath always makes me feel grounded. Make sure to relax every part of the body and focus on the sensations going on, something called a ‘body scan’ when you inhale deeply, focus on a part of the body, explore the sensations and exhale, then the next inhale, focus on a different part of the body, it can be any part, up to you. Hope this helps!