If you failed it doesn’t mean the end. All you have done is learned how something doesn’t work. Thomas Edison failed thousands of times before he succeeded in improving the light bulb design he is famous for. He never thought he failed but merely found what not to try. You must learn and move on until you find a way that brings success.
If you do succeed, continue to improve because many great inventions have come from improving other peoples ideas.