Back even in pre-windows days, there were simple un-delete programs.
As has been said "deleting" merely removes one character from the "index", and so the operating system loses the reference to this file............. The oldest undelete programs listed the files it found with missing first characters, and left it to you to type the missing letter/number.
This would only work for very recent deletions, because any newly saved files often were recorded on this "space" on this disk, regardless of where the operator might think they would be.
There is no reason to believe that this has changed except files, disks and O/Ss are all much much bigger than they were.