Prebuilt computers come with an OEM version of windows that is only usable on that motherboard that came with the system, as it's hardcoded into bios. If you had a sticker with a product key on it, then you should be able to transfer the key to a new system.
There are keyfinders available that can scour a system and find various windows keys, but you would need to have the windows system drive that had the key, and this does not work on newer versions of windows.
If you reinstalled windows onto that same original drive, you are now also looking at data recovery software to recover the old system data, then using the keyfinder to scour that old system drive for keys.
Just make sure the keyfinder is compatible with your version of...