For an external hard drive, connect it to another system to isolate the issue.
If the hard drive is not detected on another system as well, it is an issue with the hard drive or the data cable.
Try a different data cable.
If the hard drive does not work with a good known cable, hard drive needs replacement.
Please keep us posted with the results.
Thanks & Regards