Amazon had several refurbished XPs for sale about a month ago. I was tempted to get one, only because I love the XP Sound Recorder so much. Then other stuff happened that took my mind off of that for a while.
Same with Windows 7, I'm presuming.
https://superuser.com/questions/1120781/get-windows-xp-sound-recorder-on-windows-10
To run a program in compatibility mode, you right-click on the program in Windows Explorer, or on the icon if you put it on your desktop, for instance.
Select Properties from the resulting context menu.
There will be several tabs [General, Compatibility, Security, Details]. Select the Compatibility tab.
There will be options that you should be able to figure out. I did this with the 32-bit Spider card game program from XP.