Races, like ability scores, are something I don't think you can remove from DnD. But they also don't quite have a specific design space that they fill, since theoretically background can cover all the stuff about home culture you would look to race for.
Which I think is the best use of races: to broadly define a home culture for the character (background covers what you did, not where your from) in a way that doesn't require knowing the setting. That's the thing about dwarves: if you're familiar with fantasy fiction from the past 30 years, you have a mental image of dwarves that's boht vague and flexible while being surprisingly complete. Just saying "My character is a dwarf" gives the other players a lot of implied background to work with - even if none of the details are fixed, the shape of the culture is known broadly enough.
You can play against those tropes, but you can only play against tropes if those tropes exist.
Dwarves, elves, and orcs have this by virtue of longevity in DnD (which influences all other fantasy media), and goblins have equally old and established roots on fantasy in general. Dragonborn and tieflings work off of even broader well-known tropes (the proud warrior race from, like every sci-fi and fiendishnes) so they work too. Halflings and gnomes are quite as good but are close enough, and a few other races seem to work in my own experience (goliaths, centaurs).
Animal-people races lean on animal tropes, so they works to varying degrees, although in general I find them lacking since most animal tropes imply personality but not culture.
You could detail a bunch of human cultures and this theoretically should work - but in practice I find it often falls flat because you need every player to be well-versed in all of the made-up cultures in the setting which just never seems to happen. After all, it's a pretty hard-core Tolkien nerd who can talk about the culture of Gondor since that isn't in the novels or movies. (except for some royals we don't meet many). I suppose if I had a table of big-time Wheel of Time fans I could pull it off, but asking someone who hasn't read the whole series several times to join the table would leave them lost or confused.
But dwarves - I don't care what you've read or which games you've played, you know the stereotypes about dwarves. And that's enough.