Install a second SSD that already has Windows 10 installed on it
Solution 1:
Assuming a different Windows license (old Windows license, new machine with new Windows License), there is not any issue.
Still, for clarity for you and for the longer term, install, get your data in a reasonable time and then remove the drive or format it.
The reason is (a) the old license may not run properly on the new machine and (b) if it was OEM, the license is not portable anyway.
You should not have any issue.
Solution 2:
You will not have any issues. UEFI is set to boot from the first m.2 SSD. The computer will not attempt to boot from the new drive. Windows will boot from the original drive, it will see the new drive and assign it the next free drive letter. You will then be able to copy any data you need from it.
Of course, all of this is assuming you didnt use any sort of encryption on the drive or its files.
Alternatively, you could put the m.2 drive in a USB enclosure like this.
Solution 3:
UEFI, like BIOS, allows the user to choose which drive is the primary boot device. The boot partition on the 2nd device will be ignored. You can easily transfer data from the 2nd device to the new boot drive.
Be aware that Windows on the 2nd device will freak when you open the folders containing user data. It will know you are not the registered user and will attempt to block you from access to it. Your new administrator account will supersede the old one but will make the old account unusable if you decide to reuse the device as a boot drive. This will occur whether you install the drive internally or externally.