RE : i lost windows 10 key .how to reinstall.......
You do NOT need the key. Windows 10 does not work that way.
When you first upgraded from Win 7 to Win 10, was the Windows 10 activated ?
If it was activated, you have the "digital License" saved at the server.
Digital License entitles you to re-install the SAME Win 10 edition into the SAME computer any time you want and as often as you want.
No product key is required.
Activation is automatic.
RE : due to hardware change
What kind of " hardware " change ?
If it is motherboard , you might need to talk to MS Customer Support and explain the situation.
If it is NOT motherboard, just simple reinstall Win 10. No product key is required. Activation is automatic.
Please read this from Microsoft :
Reactivating Windows 10 after a hardware change
https://support.microsoft.com/en-us/help/20530/windows-10-reactivating-after-hardware-change
excerpt :
In Windows 10 (Version 1607 or later), you can link your Microsoft account to the Windows 10 digital license on your device. This can help you reactivate Windows using the Activation troubleshooter if you make a significant hardware change later, such as replacing the motherboard.