Modern GPUs support 3D acceleration through three APIs: DirectX, OpenGL, and Vulkan. In addition, the official DOSBox website keeps an exhaustive list of all the games that are compatible so that you can check whether your collection will work before you go any further.
There is extensive documentation on how to get DOSBox up and running on your PC. The most popular emulator that lets you run games designed for DOS is DOSBox. If compatibility mode still isn’t getting your games to run, you may want to try to emulate DOS from within your modern machine.
Regrettably, modern versions of Windows are no longer reliant on DOS and do not support it. As a result, many of the games released during this period were written for DOS. Until Windows XP, the Microsoft Windows operating system was built on top of MS-DOS.