A lot of issues people have had with their computers can be traced to faulty, failing, or incompatible computer memory ("RAM"). There are several memory testing applications out there. MemTest86 and MemTest86+ are currently my favorite choices, overall (yes, they are two different products).
MemTest86/MemTest86+ can be used to test your memory at its default settings, or you can use it to test your memory after adjusting its timing or if you are overclocking.
MemTest86+ is great for older systems (pre DDR4-era).
MemTest86 is great for newer systems, and EFI-based systems (including Macs).
If you want to stress test or "torture test" your system, Prime95 is a good program. It will push your RAM and CPU to the limits, and will let you know if your system can currently handle the speed at which it is running.
MemTest86+
http://www.memtest86.org/
MemTest86
https://www.memtest86.com/
Prime95:
https://www.mersenne.org/download/
(Prime95 Wikipedia)