If you need to activate Windows 10 without buying a new retail license, consider these legitimate methods:

: Microsoft provides "Generic" keys for temporary use or installation. These allow you to install the OS and test it, though they won't provide a permanent, fully-featured activation.

Do you already have a (7 or 8.1) on that machine? Windows Server 2022 Product Key | Microsoft Community Hub