I'm planning on buying a new laptop (Dell XPS 13) which has a 1TB HDD and 32GB SSD. The OS of course will be on the SSD. However, 32GB isn't enough so I'm also going to buy a 512GB M.2 SSD.

Is it possible to copy the OS from the SSD to the HDD, swap out the 32GB SSD for the 512 one, boot from the HDD and then copy it back to the new SSD?
If so, how do you do that?

Thanks in advance.