There are two different ways a race could be "official": it could be "official" in the sense of fully-tested and legal for sanctioned organized play campaigns, and it could be "official" in the sense of being published in 1st-party material from Wizards of the Coast. Which one is relevant depends on why you're looking for an "official" race.
Sources:
BR: Basic Rules, Chapter 2: Races
SRD: System Reference Document, 5e, "Races" at p. 3-7
PHB: Player's Handbook, Chapter 2: Races
DMG: Dungeon Master's Guide, "Creating New Character Options" at p. 285-287
AI: Acquisitions Incorporated, "New Race: Verdan" at p. 72-74
EE: Elemental Evil Player's Companion, Chapter 1: Races
GGR: Guildmaster's Guide to Ravnica, p. 12-21
MToF: Mordenkainen's Tome of Foes, throughout Chapters 1-5
MOoT: Mythic Odesseys of Theros, Chapter 1 > Races
LR: Locathah Rising, an Extra Life fundraiser from WotC
OGA: One Grung Above, an Extra Life fundraiser from WotC
PotA: Princes of the Apocalypse, Appendix A: Genasi
PS:ZEN: Plane Shift: Zendikar, Races of Zendikar at p. 7
PS:INN: Plane Shift: Innistrad, Life on Innistrad at p. 7
PS:KLD: Plane Shift: Kaladesh, Races of Kaladesh at p. 15
PS:AKH: Plane Shift Amonkhet, Races of Amonkhet at p. 12
Note that Plane Shift occupies a strange shade-of-grey space: it's "compatible with" D&D, published by WotC, but written by the Magic: the Gathering team instead of the D&D team (though the author of all of them was a former D&D team member). Notably, it comes with a disclaimer substantially similar to the one provided with UA articles:
The game mechanics in this supplement are usable in your D&D campaign but are not fully tempered by playtests and design iterations. For these reasons, material in this supplement is not legal in D&D Organized Play events.
SCAG: Sword Coast Adventurer's Guide, Chapter 3: Races of the Realms
TP: The Tortle Package, an Extra Life fundraiser from WotC
UA: Unearthed Arcana articles, link and name specific article when listing
UA articles are presented on WotC's website with the following notice:
You can think of the material presented in this series as similar to the first wave of the fifth edition playtest. These game mechanics are in draft form, usable in your campaign but not fully tempered by playtests and design iterations. They are not officially part of the game. For these reasons, material in this column is not legal in D&D Organized Play events.
VOLO: Volo's Guide to Monsters, Chapter 2: Character Races
WGtE: Wayfinder's Guide to Eberron, Chapter 3: Races of Eberron
E:RftLW: Eberron: Rising from the Last War, Chapter 1: Character Creation
Note that Wayfinder's Guide to Eberron and Eberron: Rising from the Last War now redundantly feature most of the same new races, though the latter reprints the goblin, bugbear, and hobgoblin races, and includes a new version of the orc race. WGtE was originally published as a "living document", and was later updated with the versions of the included races as they appear in E:RftLW.
EGtW: Explorer's Guide to Wildemount, Chapter 4: Character Options, Races
Strix: Strixhaven: A Curriculum of Chaos, Chapter 2: Character Options
FToD: Fizban's Treasury of Dragons, Chapter 1: Character Creation
MotM: Mordenkainen Presents: Monsters of the Multiverse, Chapter 1: Fantastical Races
MotM reprinted with revisions several races from previous boooks, in particular Volo's and EEPC, officially replacing those versions and labeling them Legacy. Sources giving that versions are struck through.
S:AiS: Spelljammer: Adventures in Space, Chapter 1: Character Options
Monster Manual, Hoard of the Dragon Queen, Rise of Tiamat, Tyranny of Dragons Player's Guide, Out of the Abyss, Rage of Demons Player's Guide, Curse of Strahd, Storm King's Thunder, Tales from the Yawning Portal, Xanathar's Guide to Everything, Waterdeep: Dragon Heist, and Dungeon of the Mad Mage all do not provide playable races. Tomb of Annihilation does provide one in its The Tortle Package charity supplement (the eponymous Tortle). (And Xanathar's Guide to Everything does provide racial feats, so those interested in racial options may want to take a gander at XGtE anyway.) Tasha's Cauldron of Everything contains a Custom Lineage option, which is not a race per se, but relevant to mention.
Races legal in Adventurers League play (subject to campaign rules):
- Aarakocra (
EE, EGtW, MotM)
- Aasimar: Basic (DMG, only with supporting campaign documentation)
- Aasimar: Protector, Scourge, Fallen (
VOLO, EGtW, MotM).
- Autognome (S:AiS)
- Bugbear (
VOLO, E:RftLW, EGtW, MotM)
- Centaur (
GGR, MOoT, MotM)
- Deep Gnome/Svirfneblin (
EE, SCAG, MToF, MotM)
- Dragonborn (SRD, PHB)
- Dragonborn: Chromatic, Gem, Metallic (FToD)
- Dwarf: Mountain or Hill (BR, SRD only Hill, PHB)
- Dwarf: Duergar (
SCAG, MToF, MotM)
- Elf: High, Wood, or Drow (BR, SRD only High, PHB)
- Elf: Eladrin, Sea Elf, or Shadar-kai (
MToF, MotM)
- Elf: Astral (S:AiS)
- Fairy (MotM)
- Firbolg (
VOLO, EGtW, MotM)
- Genasi (
PotA, EE, EE, EGtW, MotM)
- Giff (S:AiS)
- Gith: Githyanki or Githzerai (
MToF, MotM)
- Gnome (SRD, PHB)
- Goblin (
VOLO, GGR, E:RftLW, EGtW, MotM)
- Goliath (
EE, VOLO, EGtW, MotM)
- Halfling: Lightfoot or Stout (BR, SRD only Lightfoot, PHB)
- Halfling: Ghostwise (SCAG)
- Half-Elf (SRD, PHB)
- Half-Elf: Variant (SCAG)
- Half-Orc (SRD, PHB)
- Hadozee (S:AiS)
- Harengon (MotM)
- Hobgoblin (
VOLO, E:RftLW, EGtW, MotM)
- Human: standard or variant (BR, SRD only standard, PHB)
- Kenku (
VOLO, EGtW, MotM)
- Kobold (
VOLO, MotM)
- Lizardfolk (
VOLO, MotM)
- Minotaur (
GGR, MOoT, MotM)
- Orc (
VOLO, EGtW, MotM)
- Plasmoid (S:AiS)
- Satyr (
MOoT, MotM)
- Shifter (
E:RftLW, WGtE, MotM)
- Tabaxi (
VOLO, EGtW, MotM)
- Thri-kreen (S:AiS)
- Tiefling (SRD, PHB)
- Tiefling: Variant (Winged only with supporting campaign documentation, or upon reaching T2 when created new for DDAL Season 9) (SCAG)
- Tiefling: Bloodline Variants (MToF)
- Tortle (
The Tortle Package, charity supplement to Tomb of Annihilation, EGtW, MotM)
- Triton (
VOLO, MOoT [adds darkvision], MotM)
- Yuan-Ti Pureblood (
VOLO, MotM)
All races published by WotC:
All of the above, plus:
- Aetherborn (PS:KLD)
- Aven: Ibis-Headed, Hawk-Headed (PS:AKH)
- Changeling: (E:RftLW, WGtE)
- Dwarf (PS:KLD)
- Elf: Tajuru, Joraga, Mul daya (PS:ZEN)
- Elf: Bishtahar and Tirahar, Vahadar (PS:KLD)
- Elf: Avariel, Grugach (UA: "Elf Subraces")
- Elf: Palid, Sea (EGtW)
- Goblin (PS:ZEN)
- Grung (OGA)
- Halfling: Lotusden (EGtW)
- Hollow One (EGtW)
- Human: standard or variant (BR, SRD only standard, PHB, PS:ZEN, PS:KLD, PS:AKH)
- Human: Gavony, Kessig, Nephalia, Stensia (PS:INN)
- Kalashtar (E:RftLW, WGtE)
- Khenra (PS:AKH)
- Kor (PS:ZEN)
- Leonin (MOoT)
- Locathah (LR)
- Loxodon (GGR)
- Merfolk (PS:ZEN)
- Minotaur (PS:AKH)
- Naga (PS:AKH)
- Orc (Eberron) (E:RftLW)
- Owlin (Strix)
- Revenant (UA: "Gothic Heroes"), actually a subrace that can be applied to human, dragonborn, or tiefling
- Simic Hybrid (GGR)
- Tiefling: Infernal and Abyssal variants (UA: "That Old Black Magic")
- Tiefling: Subraces (UA: "Fiendish Options")
- Vampire (PS:ZEN)
- Vedalken (Originally in PS:KLD, revised in GGR)
- Verdan (AI)
- Viashino (UA: "Races of Ravnica")
- Warforged: (E:RftLW, WGtE)
Disclaimer: As always, consult your DM before playing one of these races: these races may not be for all players. Stop playing a race if you're not having fun doing so. Neither Wizards of the Coast nor RPG.SE are responsible for anything you do while playing one of these races. Please roll responsibly.