Use a USB to NVMe/PCIe adapter, put Kali Linux Live image either on a DVD or separate USB flash drive. Boot from the Kali image. Then use ddrescue to pull the data off the ailing drive to another storage device.
ddrescue documentation is here. Read it! ddrescue is powerful, but you need to know what the switches do or you can get gibberish.
It's the only program I know of short of data recovery services (which often use it themselves) for getting files off damaged drives... assuming the data bus can even detect the drive.
Kali Linux is here. Use the live version appropriate for your architecture.
If you're on or have access to a Mac you can use brew to install ddrescue instead of going through Kali Linux.
... however, if I remember correctly, marking a partition as "dynamic" in Windows can destroy the data on it, sometimes irretrievably. You might be able to reverse it... MIGHT... with testdisk. Testdisk is available here. It's also available by default on the Kali Linux live image. While you can use testdisk on Windows, I don't recommend it because you can do more damage to what's on that drive. Windows, by default, tries to mount everything it sees as a local storage device by default on boot. Kali Linux in forensic mode will not. It will only mount additional drives when requested and then only in read-only mode. Using either testdisk for partition recovery or ddrescue doesn't initiate a mount. It just reads the device directly. Make sure you read testdisk's documentation, too. Testdisk's companion program photorec is also downloadable from there. It tries to recover known file types, primarily picture files hence the name, and it's documentation is here. Testdisk and photorec are complimentary but operate separately with different recovery targets. ddrescue is the only forensic data recovery program I've seen that can operate with a high success rate on drives that turned out to have known or unknown bad sectors (or charge depleted cells in the case of SSDs) without paying for commercial software, especially on the new NVMe drives.
Problem is... if that SSD drive was repartitioned then Windows likely issued a TRIM command afterwards... that data is gone for good. There's no way to recover after a TRIM (assuming the drive's internal TRIM command isn't buggy). It doesn't cost you anything but time to try with testdisk... but don't hold your breath. (I probably should have led with this paragraph, sorry.)
Edited by h_b_s, 03 March 2024 - 02:29 PM.