If that doesn't work, only then will the doctor consider medical treatment. In some situations, a child is very ill, has numerous disorders or there is some urgency. For example, a child has multiple anxiety disorders and depression and is either in the hospital or unable to go to school. Then I consider medications as a first line approach along with other interventions. In cases where the drugs work very well, a child will be able to speak in more public situations, do more adventuresome things without fearing embarrassment and humiliation, and have less anxiety in general.
Children are usually more carefree, enthusiastic, and less depressed.
Each drug works in a different way on the chemical transmitters in the brain. Sometimes a medication won't work because the dose is too high or too low. Some people will not respond to one medication for the treatment of this problem but they will respond to another. If the drug doesn't work, of course, it is discontinued, and then you and I decide what do next. Both are sometimes reasonable options.