People metabolize drugs differently, so while Xanax helps some people it doesn't help others, just as with any other medication. When I took it I got more anxious. If you're going to deal with the problem with medication, you're going to have the problems of medication, and one of them is that issue of metabolizing the drug. Sometimes it just doesn't happen. You also have to know that no drug will cure you of the problem, and benzos particularly only work for a short period of time (clonazepam is the only one that acts for a long period of time, but I haven't found it to be all that helpful). But don't stop taking the drug abruptly -- it has to tapered off of very slowly. Did you ever try therapy while you were on the Xanax to see if you could work on the problem?
I can only refer to the guidelines in my country, but here, Xanax is the strongest medication you can possibly take for anxiety. It's also considered the worst (most addictive) option, which is why doctors almost never prescribe it. It's reserved for severe, treatment-resistant panic disorder, where disability or self harm would be the alternatives.
First line treatment is cognitive behavioural therapy for OCD or panic disorder, and metacognitive therapy for GAD and social anxiety disorder. If medications are to be used, it would be SSRI or SNRI, and in some cases a small dose of atypical antipsychotics. Benzos are avoided in the treatment of anxiety disorders (they are almost only used for situational anxiety like stage fright or fear of flying). If they are used, weaker variants like Oxazepam or Diazepam is preferred instead of the stronger ones like Xanax and Clonopin.
Have you tried some of these options, or did your doctor just give you Xanax and sent you home?