The overused trope of bloodline mattering for magic, when put as explicitly as this, made me roll my eyes, sigh and wonder how a story with the exact opposite would work.
So let's imagine, a world where anyone can learn magic, but when you do your body is changed to essentially develop anti-bodies to the type of magic you use, which are inherited by your kids and their kids and so on (diminishing over generations). So you won't be overly affected as while you gain those anti-bodies your affinity's- and knowledge-/familiarity- increase outpaces that enough to make training magic into a net-positive. But your children only inherit the antibodies and as such will have a huge hurdle for the same type of magic before they might have enough affinity for it to be useable - and if the parent does persist enough it might even be enough that they can't increase affinity because the immunity is too high to invoke it in the first place.
Instead, people have to (or rather, are better off if they do) train magic that haven't been used by their bloodline for generations. This might lead to a social structure naturally dissuading inbreeding among nobles, and people specializing in singular elements to not screw over their children (while anyone can become the kind of Cheat that uses all attributes if they don't care). With a nobility/clan system it's even possible they would specialize in an element and trade kids with other families at an early age to adopt and raise as their own, to let their art be inherited and carried on through generations.
The main difference would be that commoners would be rather desired marriage-partners if they lack undesired antibodies (which a limit of proliferation on magic would almost ensure). And to generate the best offspring, it could be likely to have them never learn or use any magic at all. The main-wife's children might also be the ones least privileged to inherit titles, and instead the concubines' children are raised as the successors (or both main-wife and main-husband avoid having children and both use concubines instead).
Additionally, those tropey spirit-root/affinity testers found in both fantasy and xianxia, could in such a setting simply be a measuring device that shows colours inversely proportional to the presence of those antibodies in the individual.