I'm currently teaching my yearling to take fly spray! I don't tie him up cause I know he'll shoot backwards. So I just hold him loosely and let him sniff it, then I spray it away from him and near him before spraying it on him. Then I alternate between these 4 and praise him all the way!
To get my pony used to being sprayed I first did it with the horse she loves with so she could get a glimpse of what I wanted her to do. Horses respond to pressure and release. Start gently spraying her shoulder with scratching her. If she keeps moving continue to spray until she stops. I did this with my pony and now I don't need a halter to go out into the field to spray
Put water in a spray bottle and get him used to it. Start by just spraying away from your horse then spray your hand and rub it on the horse and when she seems ready try to spray her front legs or shoulder and work your way from there
Keep spraying her and also have someone give her treats and help make it a good experience! My mare is weird about being sprayed, but I've noticed the more I do it, the less and less weird she is 😂 Good luck!
By spray I'm guessing you mean fly spray. Horses don't like when fly spray is sprayed directly on their face. It's also dangerous because it could get in their eyes. Try spraying some in your hand and rubbing it on your ponies face or try some fly ointment. I recommend the brand SWAT.