To find out which you need, see 'What activation method do I use, product key or digital license?' in Activate Windows. To activate Windows, you'll need either a digital license or a product key.
If you make significant hardware changes on your device, such as replacing your motherboard, Windows will no longer find a license that matches your device, and you’ll need to reactivate Windows to get it up and running. When installing Windows 11, the digital license associates itself with your device's hardware. Activation helps verify that your copy of Windows is genuine and hasn’t been used on more devices than the Microsoft Software License Terms allow.