They don't stop everyone, of course. But there's a solid foundation of data for the idea that when something is age-restricted to 21+, it is harder for minors to find someone to buy for them than it is to get products that are age-restricted to 18+. That was the basis for raising the tobacco/vaping age and the first studies suggest it is working; the percentage of teens who report having used a vape in the last year declined by almost a third. Part of that is education, I'm sure, but another part is that when the age is 18, it is easy to ask a senior friend to buy for you after school or at lunch (if there's an open campus) but when the age is 21, it takes more effort to find someone of legal age willing to make those purchases.