can i use windows on a upgraded system

Solution
assuming windows 10, you can use the old HDD yes, after figuring out what hardware is the new hardware you will goto settings user account and re-activate it. if you have your windows 10 under a MS OUTLOOK email account it will work just fine