If your computer has started to reboot or freeze randomly, then most likely you need to check your RAM.
In Windows 10 and Windows 11, it is possible to test RAM without the help of any third-party programs, and it is easy and so simple that even an ordinary user can perform a primary diagnostic of RAM.
Such a check will reveal memory problems with a 99% probability, if any!