As mentioned, there is a wide variety of these available of different types. They were made popular and available enough by the mining boom that there are different styles (and different qualities).
There are M.2 extension cables, I have one that lets me put the M.2 in to the drive bay away from the motherboard. There's also M.2 bifurcation cables. And you can also put the M.2 on PCIe cards, with or without a PLX switch.