As we have seen, variants of concern, such as the Delta and the Lambda variant are vast spreading and have severe features previously unseen before. The Delta variant is also currently one of the most dominant strains in the world and causing a spurt of infections in those who have been vaccinated, or the ones who have a previous infection history.
While both mediums do grant a certain level of antibody protection and immune defense, vaccine-generated immunity, at this moment, is stronger and offers greater odds of protection. There are multiple reasons for the same. For one, not only have the current vaccines clinically tested and found efficacious (even if lower) in respect to the current variants, they have also been proven to cut down on severity and mortality rates. Depending on the vaccine you do get, it could also work to greatly mitigate your risk of infection transmission as well.
In comparison to this, previously built immunity from infection (i.e., natural antibodies) might still offer protection, but we do not have enough data yet as to how well it reacts to specific variants. Natural immunity can also wane, or be less effective if a person has frail or compromised immunity.
Secondly, vaccines also offer an added advantage, since they can undergo timely upgrades and additions to make them more effective. Booster COVID shots are currently in works to mitigate the risk of infection against current severity-inducing variants, and any variants of concern that come up later.