Solving problems on PC is always a big challenge since there are many, many possible reasons in the system. First of all, it might be a simple software problem. Or it might be caused by the operating system itself. Diving deeper; drivers could also be the reason. But, there might also be a hardware-related problem on your motherboard, RAM, or CPU. Running that hardware to its limits for a while generally helps discover the problems.
Torture your hardware to diagnose!
GtkStressTesting is a simple yet handy Flatpak app that can stress your RAM and CPU up to their limits. It offers a variety of stress testing options and algorithms to make it possible to find problems if they really exist. It also shows the information of your CPU branding, L2 cache, clock speeds, and more, just like the CPU-z software in Windows operating system. In addition to that, it also can deliver some data from the sensors coming from your hardware. Sadly, some of the features are not available in virtual machines, including sensor data.
GtkStressTesting is a great app for diagnosing hardware problems while monitoring the live data from the sensors. But you should be aware of crashing; if your PC is really unstable because of a heat or voltage issue, it will most likely shut down or reset.
Flatpak
flatpak install flathub com.leinardi.gst