When a lion chases a herd of buffalo, which ones survive?
If you answered “the fastest buffalo”, then you are kind of wrong. The answer is “everyone except the slowest buffalo”.
If anyone who was not the most beautiful person failed to get a mate to reproduce with, the implication of this question would be true. But we know that is not the case.
People choose mates on the basis of a wide variety of criteria. Beauty, though an important factor, is just one among many such factors. It does play a role in mate-selection, but so do a million other things.
Some people actually don’t care much about the physical appearance of the person they have sex with. They go for other elements — intelligence for example, or wealth, or power.