It’s impossible to know without a LOT of digging, and even with it we might not find the smoking gun. Basically when this happens Dynamo has entered a bad state (so Dynamo’s fault). The reason for that bad state could be a nearly limitless number of things, including a issues with Dynamo (memory leaks a common one), issues with the host program (Revit does Revit things sometimes), or issues with another system setting (pull up task manager, go to the details tab, force quit a random process and evaluate how your stuff runs, repeat the process until there is a shutdown or a crash), or it could be user error (not saying it’s likely but everyone does something silly like acidentally changing the active doc).
In any case there is a lot of effort underway to fix as many of these kind of issues as possible. For now just add ‘restart Dynamo’s host application’ to the list of troubleshooting steps you use.
Feedback can be given on the GitHub. There is also a Twitter thread discussing some other fixes that are underway, and between myself and the many developers who check the forum most messages here get passed on one way or another. It’s part of the reason I try and read every topic - well the first posts anyways.