I think that immunity from having had covid is better than the vaccine (because of its multi-protein protection, wheras the vaccine is targeted to the spike, which mutates more).
I read some comments by experts about omicron recently. They said that in some ways the vaccines offer better protection than natural immunity. I do not understand the technical reasons. Many experts say the combination of natural and vaccines offers the best protection:
QUOTE:
Among the 6,328 people who were fully vaccinated, 324 (or 5.1%) had a positive COVID-19 PCR test. Among the 1,020 who were unvaccinated and who had previously had the infection, 89 (or 8.7%) had a positive COVID-19 PCR test.
According to the study authors, “These findings suggest that among hospitalized adults with COVID-19-like illness whose previous infection or vaccination occurred 90–179 days earlier, vaccine-induced immunity was more protective than infection-induced immunity against laboratory-confirmed COVID-19.”
[They discussed an Israeli study that reached the opposite conclusion.]
". . . Natural infection plus vaccination is better than natural infection alone.”
There are multiple levels to the immune system, and different mechanisms in B lymphocytes and T lymphocytes, as I expect readers here know. Apparently the vaccines are better at bolstering some of mechanisms, and natural immunity is better at boosting others. The details are over my head.