Don’t buy windows from eBay! You can download an iso for free from microsoft. Flash that to a USB and install it that way (or as others have suggested, just use a VM). It won’t be activated but you don’t need that for what you’re doing: www.microsoft.com/software-download/windows11
If you don’t need windows 11, I actually recommend 10 ltsc. It doesn’t come with all the bloat and adware that normal windows comes with: microsoft.com/…/download-windows-10-enterprise