The product key for Windows 10/11 OEM (Original Equipment Manufacturer) is typically stored in the firmware of the device. You can use the following command on Linux to retrieve the product key:
sudo cat /sys/firmware/acpi/tables/MSDM
This command will print the product key in the output. You can also use the following command to extract the key
sudo strings /sys/firmware/acpi/tables/MSDM | grep -i "product key"
Please note that this method only works for Windows 10/11 systems that were pre-installed on the device and that have not been reinstalled using a retail copy of the operating system.
Also, it is important to mention that the above methods may not work for all systems. It may depend on the firmware, the manufacturer, or the version of Windows 10/11, which means that the key may not be stored in the firmware or the key is encrypted and cannot be read. In that case, you can try third-party software like ProduKey, Belarc Advisor, or Magic Jelly Bean Keyfinder, but they only work on Windows systems.