Screen flash black during the work on Photoshop.

What can be a reason for that kind of behavior? It happens just when I have my Photoshop on, effects also rest of the folder view or pictures which are currently open. Sometimes after a moment view back to normal but many times I am not able to continue my work on Photoshop and as well I cannot save my files. After I will restart my computer, my files are not restored. It looks like it removes all the data that I worked on just before the black flesh happen.
I use Photoshop version 23.3.1.
Details about my computer:
Windows 11 Home
processor: AMD Ryzen 7 5800X 8-Core Processor 4.00 GHz
RAM: 32,0 GB
64-bits besturingssysteem, x64-processor
