If magic is genetic then the mages will take over the world simply by competition.
When a country, a village or a small town overpopulates, you know what happens?
Sons are sent alone, or maybe with their spouses to find new land and live there....this is how new cities were created.
But when the world population is too high, it just happens that your sons will only find occupied land, occupied by other people who are not related to you.
So how do you defend the survival of your overpopulated village and your sons? With war.....killing who took the land and stealing it, or enslaving those people and making them work for you.
it is clear that villages with mages would slowly domanite the world.
This is what happened with romans and the Japanese empire, but their "magic" was limited to better warring strategies which helped them win regardless of having less numbers, less resources and equal technology.
But with magic, it would be even more extreme.
So your only option is to make magic something that everyone can obtain, but not everyone has the time or chance to do so.
Everyone can be a Buddhist and reach the ability to perceive full peace of mind, but few monks are able to obtain it, and the ones who do, usually kill themselves in symbolic ways by setting themselves on fire, starving to death or meditating to death.
Everyone can be a world record sprinter, but only those with the best training, with the right steroids,the right sponsors (in Olympics sponsors can decide whether or not some roided athletes can participate) and the most experienced will obtain the world record. It doesn't matter If subject A is naturally faster if they trained for 15 years while subject B trained better and for 25 years, since they were 5 years old.
(also no sprinting is not genentic, there are only 2 genes that makes people natural sprinters and and the other one gene makes people natural power athletes with explosive strength, theoretically 66% of people have one of sprinting genes because ALL HUMANS DESCEN FROM RUNNERS)
Everyone in the world can have a healthy romantic relantionahip, but it is clear that this thing is incredibly rare and only happens in Hollywood. Why? Because in countries where divorce is real, it's incredibly high and getting higher every day whilst in counties where divorce is not legal we see the most abusive relationships ever. Also cheating percentages vary between 40% to 87% of men depending on the country and age, and for women, whilist it is half as much, its still a high number.
You see? Many things are possible in the world but are really hard to obtain.
In your world, everyone can achieve magic...in theory but just like all the examples I have given, it is ridiculous to even hope to do so because it's incredibly unrealistic.
The user @[Li Jun] gave you a perfect idea, only those who reach a certain age as virgins become mages.
This might seems stupid and easy, but I remind you that in the modern era in the majority of the planet age of full consent is set between 13 years old to 18 years old, and childrend can consent to have sex with other children since the age of 11 or 12 in some countries.
Also teens are hit by an avalanche of hormonal changes so it is actually unlikely for people to even reach legal maturity 18 years or 21 years in some countries and still be virgin, and it is also considered natural for teens to explore their own sexuality.
Even monks who are forced to live alone and not have any sexual activity fall to their carnal desires and in absence of women have sex with each other.
Even prisoners become gay.
Even soldiers in ancient Greece were having sex with each other, some historical sources suggest it was actually a ritual.
So it is really hard to not only maintain virginity until a certain age, but it's even harder forcing it.
Some Christian women have oral or anal sex to maintain their " virginity" so it also depends what do you consider being a virgin ( I actually had a few girlfriends who tought they were still virgins because they only had anal or oral sex)
Also numbers match up perfectly, you asked for 30 out of 10 000 people to be mages....well guess what? 0,3% of humans remain virgin to the age of 40 as suggested by this link