Depends 🙂
If it’s a Dell / HP etc.. maybe – you’ll want to reinstall onto your new hardware – at which point the disc will kindly point out that it’s not the appropriate brand. If it’s just a generic disc (and not tied to a given manufacturer) then go for it. Legally; if it’s an OEM copy you may be in a bit of a grey zone – morally I think you are in the clear (as long as you aren’t handing on your disk / copy for someone else)
You might have to ring a number to re-activate; it’s usually an automated line; I’ve occasionally had to talk to someone but have never been questioned beyond the ‘why do you need a new activation’ – ‘because my old box died/exploded/I got bored and bought some new bits’
Just do it; and if it all goes wrong install Ubuntu and then spend 3 months wondering how it all works…why you paid microsoft in the first place.