I'm really sorry to hear that you didn't have the outcome you were hoping for. It must be frustrating and disappointing. It's not uncommon for nerves to affect performance on the day of the test, even if you've been doing well in practice.
Firstly, take a deep breath. Failing a driving test doesn't mean you're a bad driver. It's a stressful situation, and nerves can get the best of anyone. It's also a learning experience, and you can use it to understand how to manage stress better in the future.
Consider talking to your instructor about your experience during the test. They might have some insights or advice on how to handle nerves and stay focused during the actual exam. Remember, it's okay to take the test again. Many people need more than one attempt, and it doesn't diminish your ability to become a skilled and confident driver.
Take a little time for yourself, regroup, and when you're ready, give it another shot. You've invested time and money into this, and it's not wasted. It's an investment in your skills and safety on the road. Keep your head up! You'll get there.