Person A tries to do something, fails, and in order to not fail again givesup.
Person B tries to do the same thing, fails, then tries again and fails, and tries again and fails, each time learning something more until on the 100th time they succeed.
Person A failed once, person B failed a hundred times, person B is better off for they have learned how to succeed rather than given up.
If you avoid doing something for fear of failure you're worse off than if you fail at it until you get it right.