Windows keys are stored in the BIOS/UEFI or the Registry. Depending on how you bought Windows, here is how to find it: Method A: The Command Prompt (OEM Keys)
Mac administration relies heavily on property list ( .plist ) files, though modern macOS security (SIP and App Store apps) makes retrieval difficult. finding installed software licenses
(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey Windows keys are stored in the BIOS/UEFI or the Registry