If you're trying to register WPML, you can generate a new WPML key from this link: (https://wpml.org/account/sites). After that, go to your site's backend, navigate to Plugins > Add New > Commercial, click on "Register WPML," and enter the key you just generated.
If I misunderstood your request, please clarify what you need and include any screenshots or a screen recording. This will help us understand how to assist you better.
For a new/separate WordPress setup and different domain, you will always need to go here (https://wpml.org/account/sites) and generate a new site key for that new domain. While in the process of creating the key, you can also set the key as "Production" or "Development."
Here is a small tutorial on how to use Duplicator: hidden link
This plugin should also easily take care of the URL-replacing process.
After migration, register WPML in your new site and enter the new key:
Please Login to your WPML account >> go to the "Sites" page (https://wpml.org/account/sites/) >> Remove your old site/domain from there >> and add your new site >> it will give you a new key which you can add back in your site in Plugins > Add new > Commercial.
You might want to take a look at this page, too, as it contains essential information that you might need when WPML sees that the current site has been copied over a different domain. You must set that new site to "this is a copy of the main site."