Windows Sandbox is a throwaway copy of Windows. Anything installed inside it is deleted when you close it.
1. Needs Windows Pro (or Enterprise) and virtualisation turned on in the BIOS.
2. Search "Turn Windows features on or off", tick Windows Sandbox, OK, and restart.
3. Open Windows Sandbox from Start. Copy the installer in (Ctrl and C, then Ctrl and V inside the window).
4. Test it inside. When you close the sandbox, everything inside is erased.
Still don't run cracked software or "free activators" on your real PC. Sandbox helps test, it isn't a licence to take risks.