A product key is a 25-character code that's used to activate Windows and helps verify that Windows hasn't been used on more PCs than the Microsoft Software License Terms allow.
Windows 11 and Windows 10: In most cases, Windows 11 and Windows 10 activates automatically using a digital license and doesn’t require you to enter a product key. However, if a product key is required, it can usually be found in the confirmation email you received after purchasing Windows, or in the box Windows came in. Microsoft doesn't keep a record of purchased product keys—visit the Microsoft Support site to learn more about activating Windows.
Windows 7 and Windows 8.1: Product keys can typically be found in the confirmation email you received after purchasing Windows or in the box Windows came in.
Learn more about finding your Windows 7 or Windows 8.1 product key