Hello there,
You can type the below CMD and get your key.
wmic path softwarelicensingservice get OA3xOriginalProductKey
The product key is also stored in the Windows Registry File
ComputerHKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionSoftwareProtectionPlatform
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer–