Word for repeating the same exact thing and finally getting it to work right. It's like a variant of Albert Einstein's ''insanity is doing something over and over again and expecting a different result'' Its similar but gets different points. A common down to earth example is like restarting your computer eventually getting it to work right and nothing done in the process changes. I was thinking lag, glitch, bug, but these are all fitting.
If you got it right the third time you can say third time's the charm (some people apparently say a charm).
you say this when someone is successful the third time they try something, after they failed the first two times
If you get it on another attempt, like second or fourth or fifth or sixth, your could substitute whichever attempt it is into the idiom. It's no longer a straightforward idiom but a rephrasing of it.