Here’s How Covid-19 Immunity Compares to Other Diseases
https://www.wired.com/story/covid-19-immunity/
One of the many unknowns about the novel coronavirus SARS-CoV-2 is how we might become immune to it. When you get infected with viruses, along with other baddies like bacteria, your immune system fights back by producing proteins called antibodies. These stick around for the long haul, and your body is prepared to churn out more of them if you come into contact with the pathogen again.
It's how vaccines work: By introducing a dead or weakened version of a virus to your immune system, you trick it into producing antibodies in response. Then if you come into contact with the real virus, your body will be ready.