Live and Learn
Failure is no reason to give up, and if anything, it can be our greatest teacher. Setbacks, errors, and mistakes teach us what DOESN'T work so that we can consciously choose a different way.
Other times, failure reminds us that our skill level simply has not reached its full potential yet. With continued effort, focus, and practice, our "trials and errors" are replaced with knowledge, experience, and progress.
When we are willing to tolerate the process growth and learning, we make success possible.