We should remove the USB hard drive with Win 7, then install Win 10 from a USB flash drive to the new SSD.
How to install win 10 we can refer to the article:
How to install Windows 10 from USB with UEFI support
If we install Win 10 within Win 7, maybe we can install it successfully, but there will be three situations:
When the USB hard drive with Win 7 and the new SSD with Win 10 both plug in the old machine, we can boot from Win 7 or Win 10 (depend on how you select), it is similar to this machine with dual operating systems.
When the USB hard drive with Win7 plugs in the old machine, the new SSD with Win10 is removed form the old machine, we can also boot from Win 7.
But when the new SSD with Win 10 is installed in the old machine, the USB hard drive with Win7 unplugs the old machine, we may not boot the old machine, because the Win 10 has no primary boot record, the primary boot record is in the USB hard drive, not in the new SSD. So when we installed the new SSD into the new machine, the new machine can not boot successfully.
Note: There will be two restarts during the installation of the Win 10 operating system. At the moment of the second reboot, immediately remove the SSD or shut down and install the SSD to a new computer later. Only now we can reinsert the USB hard drive.
So we should remove the USB hard drive with Win 7, then install Win 10 from a USB flash drive to the new SSD. Otherwise Win10 cannot exist independently of Win 7.