Yes in laptops their is nothing different with HDD you can swap HDD with any laptop. If HDD doesn't have any issues or isn't dying you will not have any issues in booting up.
But you will need to reinstall windows because there will be the driver issues and all. But you can try
Anyways why do you need to swap whole HDD just use the external case.
About CrystalDiskInfo A HDD/SSD utility software which supports a part of USB, Intel RAID and NVMe. Aoi Edition Standard Edition Shizuku Edition Kurei Kei Edition Download System Requirements OS Windows XP/Vista/7/8/8.1/10/11Windows Server 2003/2008/2012/2016/2019/2022 Architecture x86/x64/ARM64...
crystalmark.info
You can use this software to check the life of the hard drive.
Most of the modern laptops use DDR4 Ram stick it's the standard so if your old laptop have DDR4 ram you can just take them out and use them in the new laptop make sure the new one which you are buying have extra ram slots (most of the laptops have this)
HDD 2.5 is also universal thing so you don't need similar laptop to use it.
Btw i would recommend going with SSD based laptop and use external hard drive.
Depends what is the fault and what is the cost of the update is it even beneficial to spend money on old one
Whats the model of your laptop?