how to add wall brace to support light
If you can't go from stud to stud which is ideally what you want, try going from the top plate to the purlin in the wall. Depending on the age of the house you should have purlins running between the studs. If that doesn't work, you can drill a hole large enough to put a 24 to 30" 2 x 4 behind the drywall. Hold the 2 x 4 on the back of the drywall and screw through the drywall not the 2 x 4 to secure it. Then attach your shallow box to mount the vanity light. Hopefully this all makes sense.