But it has also become a bit of a joke. You can say “nailed it” when you recognize that you did a spectacularly bad job, as a way of making fun of yourself. This phrase is often used when describing a poor attempt at baking and cake decoration.
If I were trying to bake and decorate a cake that looks like a cat, but it turned out looking ridiculous, perhaps more like a spotted pig, I might exclaim, “nailed it!”
There’s even an American TV show that celebrates bad baking attempts, called Nailed It. It’s hilarious.