Hello, I’m Virginia, I have 20 years of expertise in fixing my own & friends’ PC problems.
Sorry to hear you’re experiencing problems.
The key would be in the BIOS of the broken pc so it would not be possible to recover it via the SSD.
However modern pcs do not have a key in the BIOS but are registered on the Microsoft account it is connected with. If a retail key & you install the same version of Windows (Home, Pro etc) then it should automatically activate when you sign in.
If not the either the license was OEM or the same version isn’t installed.