Sometimes it's both. I had some crazy data corruption problems that turned out to be a one-two punch of a buggy anti-cheat driver from a game I was playing and a defective M.2 SSD slot on my motherboard. Without the combination of both factors everything was fine, but when I played the game with that slot populated, the disk in that slot started getting corrupted and failing to respond to requests from the OS (eventually hanging the system).
Wild troubleshooting adventure.