If you reach a moment of clarity, enjoy.
Then in the next instant, figure out how you will avoid the problem from recurring.
A simple strategy is to set up a thought log. Whether you use a notebook and pen or an app, your goal is continuously to collect new thoughts as they occur to you.
Once a week, reflect on your collected thoughts. Consider which need a plan and which you can safely leave.
A simple plan can protect you from similar problems in the future.