That is not how I understand herd immunity.
My understanding is that herd immunity doesn't mean that people cannot get the virus, just that the virus cannot go viral because there are too many people with the necessary antibodies - much like seasonal flu.
The problem with a new virus, such as COVID-19, is that at the outset no one had immunity so the virus goes viral.
Please do correct me if my understanding of this is incorrect.
=====
The mathematics might be this:
x is the number of people one infected person will on average infect.
1-(1/x) is the minimum proportion of the population who need to have immunity from the virus to prevent it going viral.
=====
Think of it like a funny picture circulating on Facebook.
The person who creates the picture sends it to three people; each of those three people send it to three more people; those nine people each send it to three more people, but some of those 27 will have already seen the picture and won't send it on. Eventually sufficient people will have already seen the picture and won't send it on. Eventually the picture stops being sent, except occasionally one who has never seen the picture before sees it, and sends it to three more people - who don't send it on because they've already seen it. Herd immunity to the picture is thus maintained even though the picture rears itself again from time to time.