I had one case where I screwed up a shoot and thought file corruption might have been involved (it wasn't) Even though I had formatted the card with the camera and shot maybe 5 test shots I was able to recover most of the images with Disk Drill
https://www.cleverfiles.com/data-recovery-software.html
which has both Windows and Mac versions and looking at a sample of them confirmed it wasn't corruption, it was user error.