WD Elements external harddisk not detecting

My WD elements external hard disk was working fine from last 3 years. However, while copying some files into it, it stopped working.
The harddisk was showing “code 10 error: This device cannot start” in device manager but was not visible in ‘My computer’ and neither it was visible in disk management.
After that, I have tried everything, but the disk was not accessible.
Then, after trying number of things (including registry edit), it is now visible in ‘My computer’, but as soon as I click upon the drive, explorer hangs and nothing would work till the time I disconnect the harddrive. And as soon as it is disconnected, everything works perfectly normal. Neither I can check in disk management during this time, as the explorer is freezed.
Is there any way I can fix my harddrive or recover my data?

This error occurs duo to hardware initialization failure in Windows. You may connect the drive to a different PC to isolate the issue and run diagnostics on the drive to check its health status.

https://support-en.wd.com/app/answers/detail/a_id/6226

‘The Device Cannot Start Code 10’ error occurs when a device driver fails to load due to incompatibility or corruption. This error may make you lose access to your data. You can try the below methods to fix the issue:

Method 1: Update Device Driver
Method 2: Rollback Device Driver
Method 3: Run Hardware and Device Troubleshooter
Method 4: Uninstall then Re-install Device Driver
Method 5: Delete Invalid Registry Entries
Method 6: Uninstall Windows Update
Method 7: Perform System Restore
Method 8: Reinstall Windows

Further, I suggest you to check the below link for more detailed process: https://www.stellarinfo.com/blog/device-cannot-start-code-10-error/

Hope it will help!