"Experience is the comb that nature gives us after we are bald." – Belgian Proverb
The above quote is perhaps the best commentary on the concept of experience I've ever read.
Cynically put, but an incredibly insightful way to think about the process of gaining experience.
If I knew X, I wouldn't have done Y.
But if you didn't do Y, you wouldn't know X.
What we learn when we do something wrong doesn't just apply to the situation that taught us, it helps us build models for interpreting and responding to reality in general.
"There is no failure, only feedback." – Naval Ravikant