I can't believe an actual doctor said such a dumb thing. I think the best vaccine we have is against polio and that's only about 97 or 98 percent effective after three doses.
The bottom line is that vaccines (usually) introduce an inert form of something into your body so that your immune system can learn what it is and how to deal with it, so that when the real thing turns up your reaction will typically range from nothing happened to mildly unwell. It doesn't always work as the body is ridiculously complex, sometimes for some reason the chemical interactions are different (but, then, look at blood groups, there are so many variables), and of course things like viruses mutate.
Covid mutated a lot.
Therefore anybody who said that getting vaccinated will make you safe and that you won't get infected... should be replaced by somebody who knows what the hell they're talking about.