You don’t have to be outside to ground.
Lay on the ground and put your legs up the wall. Allow your shoulders to drop away from your ears.
Breathe, rest and digest.
Yes, you can ground by feet in the dirt and lying on the earth.
You can also ground by,
lifting and lowering your heels while standing
or
invert your body—put your feet above your heart
These two actions help me to stay connected to myself and this beautiful world with a regulated nervous system when I am not able to lay myelf on the actual soil.