Question: So if i bought a new pc and i want to put my old hard drive into my new pc .will it have all my stuff or will it be deleted in the process ?
Note:
sorry if the answer is obvious i hardly know anything about hard drives

Answer:

So if i bought a new pc and i want to put my old hard drive into my new pc .will it have all my stuff or will it be deleted in the process ?
Note:
sorry if the answer is obvious i hardly know anything about hard drives

This drive has the OS on it?
And you’re hoping it will simply boot up in the all new hardware?

Unlikely.

There are 3 possibilities:
It boots up just fineIt fails completelyIt eventually boots up, but you’re chasing issues for weeks/months.I’ve seen all 3. Depending on the overall difference between old parts and new parts…the likelihood of #1 changes.

All new hardware, a clean OS install is strongly recommended, often required.