I hope you are not plugging or unplugging the HDD with the power on. Good way to damage things! I also hope you are using ESD precautions (https://www.gamersnexus.net/guides/920-electrostatic-discharge-prevent-esd). The problem can't be diagnosed without more information. Can you use a SATA to USB cable to try to plug the drive into a USB port and see if it can be accessed. If it is brand new, it will need to be formatted but should still show up on Explorer.
I hope you are not plugging or unplugging the HDD with the power on. Good way to damage things! I also hope you are using ESD precautions (https://www.gamersnexus.net/guides/920-electrostatic-discharge-prevent-esd). The problem can't be diagnosed without more information. Can you use a SATA to USB cable to try to plug the drive into a USB port and see if it can be accessed. If it is brand new, it will need to be formatted but should still show up on Explorer.