To ruin or spoil something through a careless or stupid mistake.
"I completely cocked up the soufflé — I forgot to preheat the oven."
We've cocked it up, we've really cocked it up.
— John Cleese, Fawlty Towers (attributed in various interviews referencing the show's production)