I run a virtual machine with Windows XP on my laptop.

If you have Windows 10 Pro, you can run Hyper-V

For Windows 10 Home, there are various 3rd party virtual machine software, VMWare, or Virtual Box

You can actually get the VMWare Player for free:
https://www.vmware.com/products/player/faqs.html

Windows 7 pro had XP mode, but in Windows 10 you will need an XP key.
https://www.ebay.com/itm/Microsoft-Windows-XP-Professional-PRO-Version-2002-w-Product-Key-CD/302773182033?epid=2142868470&hash=item467eb01e51:g:o~gAAOSwc~xbJDgN