This can either be through having had it before, or through a vaccine.
The vaccines are a less dangerous, less symptoms, and less irritable way to train your body how to fight Covid.
Like with any training, an annual refresher will help keep your body up to date in its Covid fighting ability. If you’ve trained your body how to fight it, it won’t be as bad of you get it.