Which version of Photoshop and OS? How much RAM and spare disk capacity do you have? Have you tried resetting the Photoshop preferences, which you can do under the General tab in Photoshop preferences?
In a modern operating system, an application cannot cause the operating system to crash, but a driver can. The most likely cause is a GPU driver which is called by Photoshop. New versions are using GPU functions that were not previously used.
Ensure that your GPU driver is up to date and, if using NVidia GPU, use their Studio drivers if possible and when installing check teh advanced option and choose "Clean Install".