Unfortunately, your doctor is correct - there is no such thing as safe sex. There is safer sex, but not safe sex.
Also, if you receive oral sex, and that's unprotected, you could have genital herpes type 1, from someone who has oral hsv1.
Herpes transmits by skin to skin contact. Condoms don't cover all the skin. (HPV and syphilis also transmit this way.) You can get herpes in areas outside the areas that condoms cover. A person doesn't have to be having an outbreak to transmit, either.
What should you have done? You did everything you could have. You wore condoms. Don't beat yourself up about this.
What can you do going forward? Don't beat yourself up. What else you can do depends on what type you have, and I hope your doctor ordered it to be typed. (Call the doctor today and ask if he ordered the culture to be typed - they can tell if you have type 1 or type 2, and it's important.)
Type 1 genitally sheds less, and recurs less, so you may decide to not use daily suppressive, which reduce both. If you have type 2, you may decide to take them. (Daily suppressives are either Valtrex or acyclovir, and they are both effective. Valtrex is once a day, but more expensive. Acyclovir is twice a day, but cheaper. Many decide based on convenience vs cost.)
I can give you transmission stats, if you feel comfortable telling me your sex, and the sex of your partners.
In the meantime, read the Herpes Handbook - https://westoverheights.com/herpes/the-updated-herpes-handbook/ It's free, and written by the world's leading experts on herpes.
Can you tell us what type of test the clinic performed? If they swabbed your lesions, they should be able to tell you what type of test they performed.