Did your current computer come with Windows pre-installed? If so, you can not legally move the installation to another computer.
If you have a retail-licensed copy of Windows 7, then you legally can move the installation to a different computer.
For technical instructions, see https://www.sevenforums.com/tutorials/135077-windows-7-installation-transfer-new-computer.html
In addition to the method described a the SevenForums link, some backup software has the ability to restore a system image to new hardware. The one with which I'm familiar is Acronis True Image, which is a commercial product (i.e., not free); some of the free imaging software products may have this capability as well. For Acronis, see https://kb.acronis.com/ati2018/aur