An interesting study of vaccinated and infected individuals by age groups in Indiana in 2021 and 2022 (n = 267,847 pairs) found that while the incidence of SARS-CoV-2 was significantly higher in vaccine recipients (6.7%) than recurrences in previously infected patients with natural immunity (2.9%), the incidences of ED/ER visits and hospitalizations were 24% and 37% lower in the vaccinated. All-cause mortality was also 37% lower in the vaccinated. So the good news for vaccination is that it apparently lowers the risk for severe disease (though not all disease). But, as the article states, "vaccine effectiveness is not 100%, and the risk of breakthrough infections remains, especially with newer variants." (Am J Public Health. 2023; 113(1):96-104. https://doi.org/10.2105/AJPH.2022.307112).
Immunity provided by the mRNA vaccines tested waned within 2 months after the second dose. However, the vaccine effectiveness was still strong at 6 months post infection (86%) and especially against severe disease (96.7%). (Always look for the actual numbers when someone claims, "The vaccines are safe and effective"!) The authors speculated the strong natural immunity acquired from a previous infection may not fully compensate for detrimental effects of the initial infection itself. Age-stratified analysis noted that these differences between vaccination vs. natural immunization were also present in children though less notably so at younger ages. Unfortunately it is not certain how these data and outcomes will hold up with the newer variants.