Herd immunity varies by disease. A lot.
For each disease we estimate a number called R0, which is how many people the average person will transmit it to if no precautions are taken.
Herd immunity sets in when only 1/R0 people have not managed to get it.
With the flu, R0 is about 1.3. Meaning that herd immunity to a particular strain starts slowing the spread after about 1/4 of us are immune. (It can continue spreading for some time after that point.) I calculated that from the fact that 1 - 1/1.3 = 0.23076923076923076...
R0 for COVID-19 is likely around 5.6 +- 0.9 per https://www.medrxiv.org/content/10.1101/2020.02.07.20021154v... we take the middle of that range, over 82% of us have to get it before herd immunity starts to work in our favor.