For a long time Windows PCs (OEMs) came with a product key sticker that was often placed outside of the machine or with your computer’s manuals, but now manufacturers are storing this license within the machine’s UEFI/BIOS and the information is automatically retrieved and applied when reinstalling the operating system. Certainly a better approach overall.
Additionally, Windows 10 introduced a “Digital Entitlement” element to Microsoft’s license which links your Windows key to an ID generated based on your PC’s hardware.