https://www.nature.com/articles/s41598-022-05325-5
There are other studies that say the same thing - natural immunity is far superior to vaccination. (But also more risky since acquiring that immunity can cause people to end up in the hospital.)
The best is both:
"Two doses of BNT162b2 vaccine were associated with high short-term protection against SARS-CoV-2 infection; this protection waned considerably after 6 months. Infection-acquired immunity boosted with vaccination remained high more than 1 year after infection." https://www.nejm.org/doi/full/10.1056/NEJMoa2118691