If you want to play old games on new PCs, there are a few options:

Check Steam first and foremost.

Then check and see if the game is available on GOG.com. if it is, it will save you quite a headache from getting it to run off of disc.

If it is ONLY on disc for 95/98/XP, You're best off running these games in WINE on Linux rather than in Windows 10. I have had varying levels of success running copies of games in WINE, but it integrates well with the optical drive and the desktop environment I use.

Old Games/programs I have gotten to work with minimal/no problems:

Panzer Dragoon
Sonic R (2004 re-release)
Outrun 2006: Coast 2 Coast
Star Trek TNG: A Final Unity
Where in the World is Carmen Sandiego

Games that haven't worked on WINE:
Daytona USA
Sega Rally Championship
Billy Hatcher and the Giant Egg

Good luck!