It seems like a class rather than race thing to me. Maybe this is partly because class divisions are more salient to me than race divisions with my British upbringing but given Harry Potter is a British creation I think class is likely to be the the closest analogy.
In America, our classes are called races.
It’s more complicated than that.