I recommend checking event viewer when this issue happens to find the cause. The screen going black is most likely not related to this specific issue.
Run winver to check your current windows version. AFAIK, Win11 home do still have this issue, but happens less and not on demand for them.
Win11 pro systems does have this issue and it is repeatable 100% of the time by opening a new windows explorer window, put something in front of the explorer window and then running the command gpupdate /force.
To troubleshoot your issue, i do recommend noting down the current date and time whenever something weird happens. The more precise your note is, the easier it is to troubleshoot.
After you have the time noted down, open event viewer and filter all events by 30 min before noted time to the noted time. Also recommended to save the logs so you can easily check them again at a later date or have the ability to let other people look at it.
Most of the time you can find the issue by setting the filter to only errors, sometimes warnings can have information about this issue too. In some rare cases, informational do also contain information that let you solve it too. So check all errors first, then warnings, then informational.
If you ever wonder what an error code means or how to do stuff, you could always google the answer or just ask ChatGPT or Bing Chat for help or call a friend.