Unfortunately, the best method by far for identifying bad components is “have a spare you can try instead” or “take suspect parts and swap them into a known-good system.”
I.E. test your parts.
Memory and hard drive tests are the first thing you should run, for almost any problem, just because they’re so low-effort. Swap them into a separate system to test, if possible, and definitely make sure you’re running tests from a USB stick or CD-ROM, to help eliminate as many variables as you can.
PSU is a good bet after those, for intermittent problems, since the ENTIRE rest of the computer relies on it, and unreliable power can cause really weird and unpredictable failures. But there really isn’t much you can do to TEST a PSU without buying an electronic load tester that’s gonna cost you more than a new PSU itself. If you don’t have anyone to borrow from, a spare PSU is really a solid investment.