What you're describing is called vaccine induced immunity or artificial immunity. Natural immunity is from an infection with no vaccines involved. You know, naturally.
I would not assume without knowledge of the specifics of the case that either of them is better.
I've provided links to the specifics of this case elsewhere.