Yep, that happens. That's why you have to have a backup before it fails, not afterwards.
What filesystem is on the disk? FAT32 or HFS+ or ...? That might make a difference when selecting a data recovery program. Most are Windows oriented, so don't know about Apple or Unix file systems.
If you can't find a DIY program after reading https://www.cnet.com/forums/discussions/lost-and-found-or-the-storage-forum-sticky-354911/ consider paying for professional data recovery.
So I have a 1TB WD elements HDD. I plugged it in and a message come up saying "macOS can’t repair the disk ______. You can still open or copy files on the disk, but you can’t save changes to files on the disk. Back up the disk and reformat it as soon as you can." I have managed to copy the files to a new disk but the issues is some of my files are missing. 760GB of the HDD is used but only about 525GB worth of files were copied, meaning about 235GB of files is missing. Is there anyway I can track the files. It seems like in info of the disk that it can detect all the files are there, but the missing files are no-where to be found.