I upgraded my xbox one x to a internal 2TB SSD. It wasn’t too tough, it’s a pretty unstable thing to reproduce, but it seems to eventually always come back. Essentially you want to set up your new drive with the correct partitions, try to DD or clone through a USB booted GPARTED iso (usually won’t work), put it back in the xbox, and then do a system boot, reset or try to get the offline update to work through USB. Eventually it should do the install and bring you to the welcome screen. Then i ususally have to take it out again and expand the User Content partition again, and then pop it back in (to get all my free space, it treated it as a 1TB drive and was not seeing all my space because of how the update repartitioned it).
It’s stable once you get to the welcome screen, but it takes some frustration, luck, and getting the stupid 2 power up tones to happen on your cold-boot