Is it possible to take my existing harddrive from my comp and put it in a custom one?

Title.

 

Could I? Would I have to pay for a new one to return my comp(keeping my existing harddrive)?

https://teksyndicate.com/forum/general-discussion/return-my-prebuilt-and-build-scratch/170340

 

If it's within the past 4-6 years, it should work just fine.