Take a look a YouTube video from XFiX on how to create the XBOX ONE HDD (SSD).
There are two methods for Linux USB and for Windows.
Xbox One S and Xbox One X HDDs have the same structure.
I used this method for 2TB Samsung EVO SSD (MZ-75E2T0BW).
I created the Xbox One SSD (four partitions) in Windows 10, copy/pasted all files from the original drive into my SSD (System Support, System Update, Temp Content and User Content), replaced the drive in my Xbox One X (not Project Scorpio) and it is working just GREAT!
For HDD replacement just follow the Xbox One X teardown video here on ifixit.
14 screws T10 and 2 screws T9 (USB connector). No other tools are required.