I used to get into loops with that - I thought I understood something, then I'd try to implement it and hit a corner case, or even a caveat would come to my mind, and suddenly my understanding is crashing. I developed anxiety around this, because thinking and rethinking would mean I could spend days without anything to show for it (other than a thousand lines of semi-coherent ramblings in an Org Mode file). I started to lean towards taking things simple and direct, solving them more by feel than explicit analysis, in order to create a bedrock of something I could then iteratively improve or rewrite, without having to keep the entire problem in my head at all times.