Whether it was a rejection submission, a story no one liked, or a competition you did not win, the only failure in writing is giving up.
Just finishing a story makes you amazing. You have done what few others have done. You had an idea and you wrote it.
It was not you that was rejected, it was just that version of your story. You can edit it some more and try again or you can open a blank page and write the next one. So long as you don’t give up, you cannot fail as a writer.
Keep going. Each story you tell equips you with the experience needed to tell the next story.
You’ve got this.