People who get vaccinated and still get infected shed the virus much less. A previous infection gives an additional effect.
Both vaccination and previous infection reduce contagiousness by about a fifth. The two together reduce the risk by 40%. Which appears from an American study