You can, of course, (along the lines suggested by Martell) fresh install the Win 10 OS on your new build and then copy all the data you desire and install all the programs you desire from your "old" HDD installed in your new build.
However...
You might want to consider the option of directly installing your current HDD (containing the Win 10 OS) directly in your new build. Assuming that your "old" HDD contains a viable OS, i.e., it's non-defective, bootable, and functional, it's conceivable that you can install that disk in your new build and it will boot & function just fine in that new system.
We'll also assume that BOTH the old & new PCs are non-OEM machines and BOTH PCs are either Intel-based or AMD-based systems. (There's a chance that if the old PC is a OEM machine the transfer of the HDD from that PC to your new "generic" build may also be viable).
Obviously there are no guarantees here but it's worth a shot. There's little (actually *nothing*) to lose. You always retain the option of fresh-installing the OS together with all your programs.
So if by undertaking this transfer you're fortunate enough to gain a bootable, functional system as a result, you will, of course have all your programs, personal data, etc. available without going through that rather onerous task of installing a new system.
Obviously you may have to install different drivers of one type or another in the new system but of course these will be available from your new motherboard's driver installation CD. And you may be pleasantly surprised at Windows (Microsoft's) ability to pick up & install whatever drivers are necessary for your new installation without user intervention.
We've undertaken successful transfers of the type described many times and we nearly always undertake this option when circumstances permit, i.e. the criteria I mentioned above are met. We generally prefer to clone the contents of the drive to be transferred prior to the transfer operation as a precautionary move so that we have a comprehensive backup of all its data. I would encourage you to do the same assuming you have another disk to serve as the recipient of the cloned contents.
And you do understand that you will need a new license for the new system, right? I'm assuming, of course, that your new system will contain a new motherboard.
If you do decide to effect this transfer as described above you might let us know if it was successful or not and provide detailed info re the components of the two systems involved.