"Nailed it" is a slang expression used to indicate that someone has done something perfectly or successfully. When a person says they "nailed it," they mean they achieved a great result or accomplished a task with skill and confidence. It conveys a sense of triumph and satisfaction over the execution of a particular action or project.
The phrase "nailed it" likely derives from the literal act of driving a nail into something with precision and accuracy, suggesting that the task was completed with skill. It has entered popular vernacular and has been widely used since the late 20th century.