Can you help me understand why this scenario is taking place and what I can do (if anything).
I granted the County of Glamorgan to a courtier, he is heir to Eu in France as his brother has no children. However his brother the Count of Eu is also now heir to Glamorgan and i'm told Glamorgan will leave my Kingdom in the event of death. I assumed I would inherit the county back or anyone in inherited it would do so under my rule. I'm cautious about giving land to families due to poor AI then managing my sons AND then revolting against my heir when he takes over.
Thanks
Brothers can be heirs. So your new man already had an heir. Land only comes back to you if he has no heirs.
If Eu dies first, you get a new county. If Glamorgan dies first, you lose a county. If either have a kid, that kid changes the situation. If both have kids, inheritance carries on, but since it's still in the family, the problem may come up again if one line dies out. To be sure you do not lose the county, you can revoke it now. Otherwise, you may have to go to war over it eventually.
For the future, the safest thing is to do is to click the "not a great house" button in the search for a candidate to give land. That means their family currently holds no land and this situation won't arise unless someone gives them land later. Similarly safe is landing a low-born. Finally, while not as safe, landing distant branches of a family that already has heirs makes it less likely. This is true of your family as well as other "great" houses.
Edit: One last thing... if you're king, and have access to the law, you can pass "illegal" extra-realm inheritance. That means the title can't leave your kingdom.