If I get the small pox vaccine it's doesn't matter whether you do or not.
I was one of the first people in America not to need a Smallpox vaccine, because it has been wiped out. It was wiped out by vaccinating around all cases of it. So now it does not matter if you have a vaccine or not, because it does not exist (outside of a few labs).
But if it did exist, the vaccine was only partly effective. So if I was vaccinated, and you had the disease, there was a real chance I could get the disease.
For the sake of argument, lets say the vaccine is 90% effective. If you are vaccinated, the chances of you getting it are reduced by 90%. If I am vaccinated, the chances of you getting it and transmitting it to me are reduced by 99%. If my wife is vaccinated, the chances of you getting it, transmitting it to me, and me transmitting it to my wife are reduced by 99.9%.
In theory, this would lead to the virus having no one else to infect, and dying out. That might not happen this time, because Covid-19 has some odd traits that might get around that.
There is also the problem of mutation. If you have the virus, then it is mutating in your body. Those mutations might get around the vaccine, which could be a problem for me.