the same way we mandate almost anything. by trusting that the vast majority of people are sane and rational and will follow the law. most petty laws have a very, very minimal chance of getting caught if broken.
Why does that matter? There are lots of stores that require ids to enter. Comparing stores wanting to see your id or vaccination card to the government not letting you vote is a false equivalency as has been said.