You can use a USB to M.2 adapter (be sure it's for the correct type of drive -- SATA or NVMe;  the adapters are not interchangeable) -- or, if you have an external hard drive large enough to hold the image of the system, you can make an image to that and restore it.  Macrium Reflect (free edition) can do the job easily.  
The originally installed 256GB M.2 SSD is insufficient, so I'd like to upgrade to a 1TB M.2 SSD. In the past with older laptops I've done this with 2.5" SATA, by connecting the new drive via a USB SATA connector and then using a software program to clone the existing drive to the slave drive. Once done, shut down, swap the drive, and all is good. With M.2 SSD, I don't know what to do. The Inspiron 13 7378 2-in-1 has only one M.2 SSD slot. If I insert the new M.2 SSD, then I'll need to reinstall Windows and all of my programs. If I buy an adapter to connect an M.2 SSD via USB, will I be able to do a cloning of the M.2 SSD drive? Or is there no way to avoid a reinstall of Windows 10?
Upgrading existing M.2 SSD (Inspiron 2-in-1) and confused about migrating system