Hey there, Alan_48.
There's no need for you to do anything before you remove your M.2 SSD. You can just unplug it and replace it with the stock one. If you still have the OS on it, you should be able to boot to Windows properly and everything should be fine. If at some point you decide to use your M.2 SSD with another computer, you'd just have to reformat it and make a fresh install of Windows on it.
Hope that helps.
Boogieman_WD