One of the things I love about science is it's constantly about improvement. I don't know how old you are or where/when you were vaccinated but the vaccine has been improved several times over the years. Between improved vaccines and higher uptake, measles has been on a continual decline since the 60's to the point where half a century later, it is no longer considered endemic in North America.I've had the measles so the vaccine I took as a kid clearly didn't work.
And I'm sure you understand that vaccines have never been 100% effective. Their power is in reducing the probability of spread combined with herd immunity.