With Shamatha meditation, the instruction is to rest your gaze on a spot - on the floor, about 3' out from where you sit.
Something I learned over the years was that this instruction is important. It's important because it teaches the student about a tool they can use in their practice. Kind of a hack.
When meditating, rest your gaze on your object (that spot on the floor). When you sense your eyes wandering away from the object, you are no longer meditating. Return to the object and resume meditation. Don't go all vise-grip on the object to prevent wandering. Just rest.