Some of the best games from the 80s and 90s ran on DOS, but due to architecture changes, are completely unavailable on modern operating systems. This is how I play them today, and how you can too.
How Can You Play DOS Games Directly on Windows?
Some DOS games have been ported to Windows, which just means they’ve been modified to run on the newer software and hardware of modern PCs. However, most DOS games never had a large enough following to get that kind of treatment, so many remain inaccessible.
Alternatively, there are sites that let you play some DOS games on the Internet, but you’re dependent on their service to play. In the event of an internet outage, or if their service goes offline, you’re out of luck.
Running Your Own DOS Machine Only Takes a Few Clicks
Luckily, there is a more reliable (and as easy) way to play DOS games on your PC: DOSBox, and its subsequent forks.
The original DOSBox hasn’t been updated in a long time. Luckily, others have picked up the effort.
Since the original DOSBox seems to be defunct, I have moved to DOSBox Staging when I want to take a nostalgic gaming trip down memory lane.
DOSBox Staging is a full emulator for a DOS system, which means it also mimics era-appropriate hardware. That is significant, since modern DOS operating systems (Like FreeDOS, which is excellent) use modern hardware.

Related
FreeDOS vs. DOSBox: Which Is Best for Running MS-DOS Apps?
What’s the difference between the two, and which should you choose?
You might be able to get some DOS games running on a virtual machine running FreeDOS, but you’re going to have to jump through hoops to make it happen. DOSBox Staging (and other DOSBox forks) takes most of the technical details out of the equation. Just install the emulator, grab your game, and before you know it, you’ve died of dysentery on the Oregon Trail.
Running DOSBox Staging on Windows
To get started with DOSBox, download and install the program from the DOSBox website.

The first time you launch DOSBox Staging, you’ll be greeted with a (somewhat) familiar prompt. If you’ve never used DOSBox, DOS, or any operating system like it before, I’d recommend typing INTRO to go over the basics—it’ll save you some time later. Just tab through the pages by pressing Enter.
The most important part is on the second page, which tells you how to actually get DOSBox Staging to see your games. They suggest running mount c c:dosgames.

I ran a slight variation of the suggested command:
mount c c:dos
What you name the folder isn’t all that important, just make a mental note of where it is. I put it on my C: drive because I have some free space available, and it is fast—not that it matters all that much for emulating DOS games.

I also created a subfolder within the DOS folder to contain my games. You can use Windows 11’s File Explorer to do this if you want, but I’m going to do it from within DOSBox. To begin, note that the current active directory is Z: rather than C:.

First, type C: to change to the virtual C drive we just created.

Then, type mkdir (foldername), where you replace (foldername) with whatever you want. I went with DOSGAMES since I’d previously created a games folder.
Now, whenever you want to install a game, just drag and drop the entire folder straight into your games (or DOSGAMES) folder. Then use the cd command to navigate to the executable and run it. If you need to view the contents of your current folder, type dir.
To run an EXE, just type the full name of the executable. In my case, I’m launching the Oregon Trail.

Where Do You Get DOS Games?
Unfortunately, getting DOS games usually puts you in a legal grey area at best. Most DOS games are abandonware, which means their developers have long since dropped all support for them, and laws around copyright aren’t usually enforced. However, it is still illegal to download abandonware in most jurisdictions.
Alternatively, I’ve actually had good luck finding physical copies of floppies at yard sales, estate sales, and other places like that.
The major problem there? You need a floppy drive to create a digital copy, or to mount it on your PC! Luckily, you can usually pick one up for less than 20 dollars.

Chuanganzhuo 3.5 USB External Floppy Disk Drive
A USB 3.5-inch floppy drive, for when you need to read a floppy on a modern PC. It is available with two different textures: frosted or brushed.
DOS games, despite their age and relative simplicity, can still be a fun way to spend a few hours. If nothing else, it is always interesting to see just how many elements of early games have hung around into the modern era.