This sounds conflicting I read somewhere else earlier today, that the immunity you get from the actual disease is tailored towards the specific variant/strain.
Whereas the vaccines (at least the mRNA ones) confer immunity against multiple strains.
It's an interesting concept. When your body makes antibodies against an active infection, it targets more than just the spike protein. Against the vaccine, it targets the spike protein 100% because that's all it has. As variants come and go, you should expect that the spike protein will change -- but it can't change that much because changing too much will reduce its ability to infect cells -- so it's a good thing to have a wide variety of antibodies against. However, having antibodies against other parts of the virus is useful too, since those might be more conserved with variants, but also they could be conserved less -- we don't really know.
I meant the article said that the actual disease confers greater immunity than a vaccine.
While that might be true, that immunity would only be good for one particular strain of the virus as opposed to the vaccine which provides you protection against a wider variety of strains.
One can argue that the protection from the vaccine is better in the sense, that it protects you from a wider variety of Covid strains.
Also, just so you know, that while the (mRNA) vaccine replicates protein, it is still your body and immune system which reacts to this protein and creates the antibodies.
So even in case of the vaccine, strictly speaking the immunity is natural.
Whereas the vaccines (at least the mRNA ones) confer immunity against multiple strains.