The file size gives it awayEvery NEF, CR3 and ARW has a small JPEG tucked inside it, there so the camera can show you the shot on the back. Ordinary tools grab that, mark the RAW as done and move on. Hence a 50MB frame turning up at 5MB.
Big files are seldom in one pieceA card rarely has a single free stretch long enough to hold a large file whole. A basic carver starts at the beginning, hits the first gap and stops there; on a small JPEG you lose little, on a RAW or a video clip you lose everything. Which run follows which is written into the format itself.
Each RAW format breaks differentlyCR2 is built on TIFF, which takes damage reasonably well. CR3 sits in a newer container and fails in a different way again. A damaged NEF tends to band the picture green and purple. RAF, ORF, ARW, RW2 and DNG all have to be read on their own terms, and no single tool off the shelf manages every one.
What deleting a file really doesOn FAT and exFAT, a delete releases the cluster chain and a format does the same; nothing else on the card is touched. That is the only reason recovery works at all — and the same reason the next picture you take may be written straight over the frame you wanted.