Welcome to the forums, newcomer!
Please include/list your specs like so:
CPU:
Motherboard:
Ram:
SSD/HDD:
GPU:
PSU:
OS:
You might want to include the age of the PSU as well. Rule out a faulty/failing SATA data cable by replacing it with another. Rule out the connector for SATA power cable by replacing it with another. I hope you're not using an adapter from a molex to SATA to power your SATAS device.