On my new PC the Windows Explorer frequently crashed and restarted. This happened in the background while working in other applications. As a result all Windows Explorer windows were closed and some taskbar icons disappeared till next restart. While working in Windows Explorer, the context menus opened slowly.
After researching the problem, I tried to upgrade from Windows 10 to Windows 11, but the problem persisted. I went back to Windows 10 and still had the problem. I read something about display drivers. Some display drivers might cause the crashes. Many people mention especially Intel UHD Graphics 630 and other integrated Intel cards.
As I do run an HP EliteDesk G6 Mini with an Intel UHD Graphics 630 plus an NVIDIA GeForce GTX 1660 Ti, but use the ports of the faster NVIDIA adapter only, I just disabled the Intel card in the Windows Device Manager and finally got rid of the Windows Explorer crashes.
If you are not able to disable the entire display adapter, you might want to try to change the graphics driver to a Microsoft Windows default one or to a newer or even older release of the manufacturer.