Problems with a slow or crashing right-click menu (also known as the shell context menu) are almost always caused by faulty third-party software (so-called shell extensions) that adds items to a file's context menu. Sometimes the crash doesn't happen immediately, but only after a certain amount of time has passed.
To verify and work-around the above, do this in XYplorer:
Then retry right-clicking the same file that caused the error. If the problem disappears, you need to find out which particular shell extension is the culprit. One way is to disable these shell extensions one by one using the free ShellExView program:
ShellExView - Shell Extensions Manager
If you found the culprit keep it disabled.