It depends what year model MBP you have. All of them use a proprietary connector for the SSD (it looks like M.2 but it isn't), but Apple has tweaked the connector a few times (they REALLY don't want you swapping SSDs). You can get an adapter to plug the early ones into a regular SATA port.
https://www.amazon.com/QNINE-Adapter-Macbook-Converter-Support/dp/B06XH7K2C6
Around 2013, Apple began encrypting the datastream between the connector and SSD. AFAIK, only OWC has managed to reverse engineer it. But they only list replacement SSDs on their website, no adapters. If you have a newer MBP, you can try contacting OWC to see if they can help. Otherwise the only thing you can do is stick it into another MBP to recover the data, then...