Enter Libretro, which decided in late 2018 that it would commit to creating an Xbox One-compatible UWP build of its popular emulator package. That version launched in Alpha in 2019 and has been updated sporadically since. Ars has confirmed that a new build works on the Xbox Series X as well, allowing your new console to pretend to be anything from an Atari 2600 to a Wii, with a whole lot of consoles in between.
Getting RetroArch on your brand-new Xbox isn't as simple as just inserting a USB drive and puttering away. First, you have to sign up for a Microsoft Developer Account through the Windows Dev Center portal. There's a one-time $19 fee associated with registering an individual account, so you'll have to decide early what the possibility of running emulators on the Xbox is worth to you.
Once you're registered, go to your console and search for the "Dev Mode Activation" app in the Store. The system will guide you through a few steps to link the console to your new Developer account, and you may have to download some updates before restarting in Developer Mode (if the update doesn't take for some reason, this trick may work to force the system into Developer Mode).
Be aware that an Xbox console in Development Mode won't be able to play any retail Xbox games, either on disc or download. It's relatively simple to switch back and forth to/from retail mode using the on-screen menu, though, as long as you're willing to wait for the system to reboot.
With your console in Developer Mode (and connected to the Internet), the screen should display an IP address for local network access to the system. Type that address in a Web browser on your computer to open up the Xbox Device Portal. From there, simply download the Xbox One RetroArch files and dependencies (labeled as "UWP runtime package") from the RetroArch website, then upload them to your console using the green "Add" button on the Device Portal page.
When you go back to your console, RetroArch should appear as a launchable project whenever you're in Developer Mode. From inside RetroArch, you should be able to use the on-screen menus to directly download updates to the front-end interface and backend cores directly on the system itself.
Note that some of the emulation cores included in the RetroArch package require a BIOS file pulled from actual hardware to work; you'll have to source and upload those yourself (from your own legitimate hardware, of course). And while RetroArch has a number of homebrew, shareware, and open source ROMs available for download directly through its system menus, you'll have to find and upload any additional ROMs (such as backups ripped from your own game collection) on your own.
This is especially true when it comes to recreating relatively recent and/or difficult-to-emulate 3D hardware like the Gamecube/Wii, Saturn, or PSP. For these consoles, the extra hardware power on the new Xbox consoles helps emulation run more smoothly than you might expect from cheaper devices. As long as you don't expect completely perfect authenticity or compatibility, it seems that Xbox Series X/S hardware can stand in pretty well for older systems.
The developers at Libretro will continue to update RetroArch and its underlying emulation cores as time goes on, too, so new advancements in emulation technology should make their way to the Xbox UWP build in due time. Right now, the team seems close to getting PlayStation 2 emulation core PCSX2 into workable shape in RetroArch, which would be a bit ironic considering that PS2 games are not natively compatible with the PlayStation 5.