Herd immunity realistically speaking only comes about through vaccination, so the question is perhaps meaningless.
Looking on the pessimistic side the chances of a vaccine working may not be great, as the way coronaviruses affect the human body means that as far as I know to date no coronavirus has ever had a vaccine successfully developed for it.
So the answer in that case might be : gradual resistance over time in such a way that it becomes less harmful.
Other bad news is that the less badly affected you were when you caught it, the less immune you’ll probably be next time.