My passport 4TB

My WD External storage Passport 4 TB about a year and half old. the drive is some times accessible and even can see the Folders and even some of the files. When I try to open the files it says “there was an error opening this file” This is my second My passport external storage which I returned the first one with a similar problem. I lost very important files in the first one and again I have a problem with the new one. I am frustrated. Can any one tell/help how to access and recover my files?
Thanks

Hello,

Please perform a diagnostic test on the drive to determine the optimal health of the drive by following the KBA: Error

thank you very much for your help.
I downloaded the WD security and WD utility and did as instructed but didn’t work for me. I guess it is not reading the drive. (it says drive inaccessible). I am very disappointed, I have thousands of important files and I am giving up losing all my files. I know I can format the drive and use it again. but, what guarantee do I have if this doesn’t happen again? this is my second My Passport external storage. . so please please let me know if there is anything I can do before I garbage it.
thanks