TestDisk and PhotoRec are free data recovery software programs. TestDisk can recover lost partitions and repair FAT/NTFS, while PhotoRec is designed to recover lost files and pictures from various sources such as hard disks and digital camera memory.

PhotoRec, on the other hand, is a File Recovery program that specializes in recovering lost files, including videos, documents, archives, and digital camera memory pictures (hence the name Photo Recovery). Unlike similar programs that rely on the filesystem, PhotoRec goes straight for the underlying data, meaning it can still retrieve lost files even if your media's filesystem has been significantly damaged or reformatted (though it cannot recover overwritten data).
Overall, both TestDisk and PhotoRec are standout recovery programs that can help you retrieve lost data and make damaged disks functional again.
Version 7.1: https://www.cgsecurity.org/wiki/TestDisk_7.1_Release