In general an upgrade has to be in place. Therefore you'd need to install Win10 Pro on the new computer and then you can upgrade it to Win11 Pro. In some cases Windows would let you install an update on a clean machine but during the initial setup process it would require that you provide it a copy of the previous Windows media so it could confirm you were upgrading (since that is cheaper). So if you have a copy of the Windows 10 Pro media on a DVD or USB then you could try just installing the Win11 Pro media directly first.
If you're buying a new computer from an OEM then they are going to ship you a copy of Win 11 already installed, most likely Home. If you have a license key for Win 11 Pro then you can just change the edition within Windows directly and don't need to reinstall anything.