Welcome to Microsoft Q&A! Thanks for your question, Prashant Rawat.
Like Marc said above, the good news is that pre-installed Windows license is often embedded in the laptop’s motherboard firmware (UEFI/BIOS). That means it is not stored on the hard drive, so replacing the HDD/SSD doesn’t affect it. Even if a pirated version was installed, once you reinstall a clean, official copy of Windows, it will detect the embedded license and activate automatically.
You can self-check the embedded key by using PowerShell (Admin) > run the following command (Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey
If it returns a key, that confirms your device has an OEM license embedded. All you have to do next is to follow the instructions to Reinstall Windows with the installation media - Microsoft Support using a bootable installation media. In case Windows doesn’t activate after a clean reinstall, here are something you should try to resolve them:
- Run the Activation Troubleshooter: Go to Settings > System > Activation > Troubleshoot
- Manually enter the key from PowerShell: Open Settings > Activation > Change product key.
If the shop changed more than just the SSD (e.g., motherboard), the digital license may no longer apply. If the issue persists, you may need to contact Microsoft Support to reactivate Windows manually!
If the answer is helpful, please click "Accept Answer" and kindly upvote it to assist others who might face similar issues. If you have extra questions, please click "Comment".
Note: To enable e-mail notifications, follow the steps in our documentation!