The vaccines actually do prevent people from getting the virus, too. But no vaccine is 100% effective, so the rest of what you're saying still applies. This was why mask mandates weren't immediately lifted after vaccines became available, and why people like Fauci have noted that the US didn't need a mask mandate after a certain point of vaccination with highly effective vaccines, whereas other countries may need to consider using masks (as the WHO recommends).
The problem is that people will generally believe their lyin' eyes about anecdotal evidence more than they'll believe abstract evidence based on large numbers, even though the abstract evidence is more valid. Of course, people who dismiss the danger of COVID are on all sides of this, mostly because it's more important to them to not have a reason to be told what to do for public health purposes than to take expert advice about COVID into consideration. That's a genuine political problem, but public health interventionists sometimes don't acknowledge the burden of public health measures, while COVID-dismissive people aren't terribly interested in any evidence that doesn't confirm what they want to think.