Hard drive showing I/O error after upgrade CPU and mother board

I upgraded my PC with new CPU and mother board, installing a old 6TB WD black hard drive
Then the drive showing as uninistialized in windows10, and if I try to inistialize it, windows 10 is giving I/O error
I have tried reconnect and made sure connection are clean and secure

How can I recovery my data?

If so, your data is likely gone. Without backups, there is little hope of getting it back without the expensive help of a data recovery company.

But if you trust your technical skills, you may want to doubt your own claims. In this case, restoring your previous configuration might eliminate the I/O errors you are currently suffering from and allow the currently inaccessible data to be backed up.

If my HDD still in warrenty, do I need to get a replacement.
As I cant event format it right now