You get to decide what both success and failure mean to you. Remember there is a middle ground between the two, so just because you don’t reach a lofty goal you set for yourself, it does not mean you’ve failed.
The only true failure is in giving up. Quitting a project (or not even starting it) means you’ll stay stationary. If you attempt something and it doesn’t turn out as you’d hoped, at least it’s a step forward towards your goal, and you know to try something different next time.
Failure is only an end point if you let it be. You can choose to focus on the positives and take what you learned from the experience to move on and try again, or you can call it quits. It’s up to you to decide if the failure is going to be the end, or just a dip in the road.