I view a D&D race as a cultural "assemblage" of "prominent" features. No individual member of the race exhibits all of its features.
For example, the D&D elf is known for many things, namely an "assemblage" of features. Some have Fey Teleport, some have Elven Accuracy, skills include Perception, Arcana, Persuasion, History, Survival, certain tools, some are among the best Bards, some are among the best Wizards, some are among the best Druids, some are among the best agility fighters, some elves are strong, some can fly, some can shapeshift, and so on. No elf is all of these things.
When statting up the races in a Players Handbook, I appreciate each race having a list of feats to choose from during character creation. There can be several prominent feats or choices of two "half-feats" (without the ability improvements). Let the player choose which features they want for the race concept of ones character.
An elf character might choose Fey Teleport or Elven Accuracy or Uda Magic or whatever from the other feats, at level 1 creation. Some elf concepts might cohere well with darkvision, the ones that are nocturnal or subterranean, while other elf concepts dont cohere with darkvision, the ones relating to sunlight, and might have a Light or Dancing Lights cantrip instead.
The word "prominent" is helpful because it means the culture values this feature, without implying that every member exhibits this feature. For example, some human cultures value "wealth" without implying that every member of the culture is wealthy. A culture where wealth is prominent might intentionally award special status and privileges to a wealthy individual, along with obligations to use the wealth judiciously on behalf of the other members of the culture. In some elf cultures, the Druid is prominent. In other elf cultures, the Wizard is prominent.
Design a "high elf" culture, comprising separate military institutions, one for mainly Eldritch Knights as a magical infantry and one for mainly Wizards as a magical artillery. These two magical combatant archetypes are "prominent", thereby indirectly their respective key abilities, Dexterity and Intelligence, are prominent too. The Wizards tend toward Intelligence +2, and the Knights toward Dexterity +2. At the same time, there are many civilian high elves who did their time training during the obligatory military service, but lack a special aptitude for it, and have their ability score +2 corresponding to other classes that they have more aptitude for.
In a Players Handbook, relating to the choice of feats for each race, there can also be a list of race backgrounds to choose from.
Each race has different cultures. The choice of backgrounds helps sketch out what the features of each culture are. For example, udadrow cultures can include a Lolth Priestess as a specific background, where Lolth is a Bond, and perhaps causes the tattoo-like spiderweb markings if maintaining the favor of Lolth. Those elves who take this backgrounds might be Clerics, but some might be Paladins, Warlocks − or any class is conceivable depending on a specific character concept. A wood elf culture might have a specific background relating to a family of nomadic magical hunters. In 5e, it is balanced for a background to grant a proficiency with a weapon, such as a deer hunter gaining longbow proficiency or a boar hunter gaining spear proficiency. A background can be extremely specific, to help sketch out a specific feature of one of the cultures of a certain race.
With regard to the race ability improvements, I prefer they discontinue. Move all ability related mechanics to the ability score generation chapter of the Players Handbook. Use the array or roll the dice, or have the table agree on some other method. Then add a floating +2 or +1 to heighten a high score or soften a low score.
The race world building and the race character concepts actually become more specific and more flavorful, when avoiding calling attention to gaming mechanics. Mention "knights that wield fey magic" are prominent among high elves, without saying +2 Dex and +1 Int. Besides, sometimes +2 Int and +1 Str might make more sense − and besides again, some of these high elf fey knights might be Ancients Paladins. When designing a race, focus on the flavor, not the mechanics.
An earlier suggestion by
@Malmuria is that race features should probably focus on features that dont roll dice.
Maybe one race is immune to fire as a reaction per long rest, and otherwise is resistant to fire. Maybe an elven good fate guarantees success on one d20 check for oneself or an ally, once per long rest. While a dwarven bad fate guarantees failure on one d20 once per long rest check for an opponent. These autowin or always-on features do more to define the feel of a race flavor, than any random roll can. Traits like these can be among the feats and half-feats to choose from.
Designing a race as a collection of prominent features to choose from − a cultural "assemblage" of feats and backgrounds − has many benefits.
• An assemblage feels more realistic than a stereotype. The members of a race are diverse.
• A player is more likely to find among the options a feature that helps the character concept that the player has in mind.
• A DM world builder can tweak a race, by adding or subtracting from the choices, while leaving the rest of the assemblage in place.
• A DM world builder can diversify a race by having one culture tend toward certain race feats and an other culture others.
• A culture can include magical cultures that transmit magical features.
• Meanwhile the individual members of a culture of a race, can remain unique.
Heh, perhaps the greatest benefit of all, the floating ability improvements and choice of features, means there is no longer justification for the tens or hundreds of elf subraces. Elves are an assemblage of features, and different elven cultures tend toward different kinds of magical features. But each elf is unique.