It’s no secret. When you’re trying too hard to solve a story problem, you come up blank. But once you start doing something else, usually something physical and mundane where you don’t have to think, your mind keeps working in the background and suddenly comes up with a solution that’s perfect.
Agatha Christie did all her plotting while doing the dishes.
For me it’s cooking and laundry. When I get stuck, I go down to the kitchen to eat a snack or cook some food and eat it, and I concentrate on cooking and eating, and then BOOM, my brain gives me a solution, and I race upstairs to write it down. Or I do laundry. The physical task of putting clothes in the washer, taking them out, putting them in the dryer, taking them out, folding them—focuses me on the physical task, and again my brain works in the background.
Another thing that helps me is going on a walk or on a bike ride, but it takes longer, and it’s not every day that I can do that, so most days I work until I feel hunger, then wait for the moment when I need to think, and go to the kitchen to eat and think.
I’ve heard people take showers, walk their dog, do gardening, work out.
Whatever physical thing works for you, incorporate it into your writing routine so when you’re faced with a problem, instead of obsessing over solving it and getting more and more frustrated (and inevitably getting stuck, then blocked, then wanting to give up), switch to your physical task and watch your brain perform miracles.