I had a Samsung 850 SSD (SATA) with Windows 10 on it. I bought Samsung 970 SSD (M.2). Turned off the computer, plugged it in, inserted a bootable USB stick with Windows 10 on it. Went directly to BIOS and changed boot priority to boot from the stick. Then, I installed Windows 10 on the new drive...