Infection can raise the risk of reinfection
Prior infection by some variants is found to decrease rather than increase immune response to later variants in people who were vaccinated. Prior infection by Omicron only poorly increases immune response to later infections by other Omicron variants.
This finding opposes the theory that better “hybrid” immunity arises from vaccination paired with infection — infections that also raise the risk of Long Covid.
Source: Immune boosting by B.1.1.529 (Omicron) depends on previous SARS-CoV-2 exposure | Science