Put it right after the visible mistake in a short edit, then follow it with the Oh My God Wow for a bigger reaction, or open with the No No Wait Wait before the error so the headache becomes the payoff.
About this sound
This is a short Portuguese voice clip, about four seconds long, built around Alan's exasperated cry of 'Ai minha cabeça' as if a headache has just hit mid-conversation. It lands as a comic groan of pain and disbelief, the kind of over-the-top reaction that makes a silly mistake or a bad idea feel instantly worse, and it works best when the frustration is meant to be funny rather than serious.