I shut down my PC earlier, and when I turned it back on, it displayed a warning that the hard drive may be failing soon. The computer is a 2017 prebuilt with a GTX 1070. I don't know much about PC hardware, but I'd rather repair it than spend a large amount on a completely new system since I barely game anymore. Can I simply replace the hard drive, and would a SATA SSD be a better choice for an older PC? I'd also appreciate advice on transferring my files and reinstalling the operating system.
3 Answers
That warning usually means the drive has detected a problem but hasn’t completely died yet. Back up anything important immediately, and avoid treating the old drive as reliable. You can replace it without replacing the whole PC.
A 2.5-inch SATA SSD should work well in a 2017 desktop and will make Windows feel dramatically faster than a mechanical hard drive. SSDs are inexpensive now, and a reputable model from a major manufacturer is a good choice. You’ll connect it with the same data and power cables, then either clone the old drive or install Windows fresh on the SSD.
You may still be able to transfer everything while the drive is working, but don’t wait too long. If the data is especially important, make a backup before attempting a clone. For a normal replacement, install the SSD, create Windows installation media, install the operating system, and then reconnect the old drive only long enough to recover personal files.

If the old drive is already reporting errors, a fresh Windows installation is safer than cloning. You can connect the old drive afterward, preferably through a USB-to-SATA adapter, and copy over whatever files are still readable.