The way most people think of vaccines is pretty simple: you get vaccinated, and your immune system is primed and trained to fight off the invisible intruder in question, be it virus or bacteria. If you’re protected, you can’t be infected, and if you’re not infected, then you can’t spread it to anyone else.
And that's true most of the time. But not all vaccines work that way, and it's not actually what the two COVID-19 vaccines authorized by the U.S.