No they don't if they did we'd all have masks and there would be no viruses.
They can help control the spread as well as other things.
The only thing that stops a virus is immunity.
And that is why we wear them. Those that want to participate in using people's facilities, transportation, etc, have to follow guidelines. Otherwise, you get to stay home and make do without the priveledges of society.