You haven't mentioned why you lost data from the MacBook Pro 2017, so I recommend you implement data recovery software via professional data recovery software first, which is easier and safer to perform than removing the SSD directly.
iBoysoft Data Recovery Software is highly suggested which is configured with advanced disk scanning skills and data recovery algorithms, always aiming to bring your lost files and folders back!
If the device totally gives no response or suffers from physical damage, the only way you can carry on is to remove the SSD and put it into a suitable reader or adapter to connect the MacBook Pro for file access.
Anyway, hope you are luck enough to grab all the files and folders successfully. Please to make a backup of the files to avoid further data loss.