Apple first introduced proprietary flash SSD with MacBook Air 2010 and 2011 and then in 2012 machines. It continued with Macbook Pro and iMac late 2012 and early 2013. All three above have different shapes and connectors and are SATA based. From Mid 2013, PCIe AHCI and later NVME-based flash SSDs were used with MacBook Air, MacBook Pro, iMac, Mac Mini and Mac Pro.
These were all the same shape and connector except for the late 2015 iMac, whose SSD is slightly smaller. I only know about OWC, which manufactures external enclosures for the above SSDs. I break it down by machine and year of make below with direct links to compatible products. There are two main reasons why you may need enclosure.
SSD from the above has a 6 + 12 pin connector, and you can find the link to a compatible enclosure below.
Link: Click here
SSD from the above machine has 7 + 17 pins, and you can find the link to a compatible enclosure below.
Link: Click Here
SSD from the above machine has 8 + 18 pins, and you can find the link to a compatible enclosure below.
Link: Click Here
SSD from the above machine has 12 + 16 pins, and you can find the link to a compatible enclosure below.
Link: Click Here
Note: SSD from iMac Late 2015 (model identifier iMac17,1) is incompatible with this enclosure. As far as I know, no enclosure is available for this iMac SSD.