Apple uses a proprietary PCIe SSD connector and OWC has made a USB enclosure for some of the older non-USBC model SSDs, yet it is unavailable for the MacBook Pro 2017. I don't think there is any vendor that ships an adapter for your SSD.
If you can make the dead laptop turn on (it does not need to actually boot or show anything on the screen), you can try to connect it to another functional device and put it into Larger Disk Mode, then the broken Mac may show up as an external hard drive for you to recover files from a dead MacBook Pro.
Lastly, it cannot be emphasized any more that you should make a full backup of your device in real-time, or accidents like this may happen at any time.