Losing comes before winning, not just in the dictionary but in real life too.
When I started playing badminton a the age of 12, I lost a lot of matches, perhaps the majority of the matches I played I lost.
I knew I was losing the matches because I didn’t have the stamina to last a match and especially a best of 3 game. But I kept playing with players who were a lot more advance than me, and a lot fitter too.
District level and professional matches were twice as long so I started training for endurance and stamina. To speed up the process, I even started adding some basic strength training exercises too.
The only way to get better was to compete with people who were better than you.
This meant that I had to lose almost all the matches I was playing in order to get better.
Losing too much can be super demotivating too. So losing is good, but losing too often will make you quit the thing completely.
So use your failures and losses to set up the next goals. Learn from them, work on them.