I found the following from an Israeli news source . It indicates that immunity from a previous bout of covid may be better than a vaccine in prevention of covid.
(The vaccine does appear to prevent serious disease, but that's another issue.)
Natural infection vs vaccination: Which gives more protection? Nearly 40% of new COVID patients were vaccinated - compared to just 1% who had been infected previously.