So, your dog Maya sounds like she is very uncomfortable around people. Some dogs do not like strangers touching them. Some dogs were not socialized properly when they were young. There can be a myriad of reasons why Maya is uncomfortable with being touched or hugged.
But----now that Maya has clearly told you in no uncertain terms that she is uncomfortable about being touched, it is your job to keep her from being anxious about people touching her, otherwise you are risking a very serious bite to a person, which you do not want I am quite sure.
In some cities, if a dog bites three times, the city can put the dog to sleep, even if they are minor bites. Dog bites are serious. And a dog who has escalated to biting is a serious issue that needs attention. I am very glad you are seeking help now.
So if I were you, for now, just to be safe, I would not allow people to pet her-- and certainly NOT allow any hugs from anyone!!! Maybe after you get help for her, but for now it is better to be safe than sorry. Your dog will not die from not getting pet from strangers or your friends, but dire consequences can happen to dogs that make a habit of biting from stress.
If you take her out in public for walks, etc, you must always have her on a leash so no one will be able to pet her without your consent. So I personally would never have her loose in a park, etc-- esp if kids are around.
If walking her on leash, and someone comes towards you guys, pull her closer to you in a gentle way and say nicely "Maya stay with me. Good girl" If you say it loud enough for the other person to hear you, that sends them the message that you are working/training with your dog--- and usually they will not proceed to pet your dog.
Also, I would teach Maya that she can only greet people that you give her permission to. Again, if you see people on a path coming near you, pull her to the side and say "stay with me, Maya" and only allow her to greet--- if you think you want to deal with telling the person NOT to pet Maya. It gets old and tiresome to do this everytime, but it is necessary if you are going to take a dog out in public that has fear of being touched.
Another thing that works for me is to tell people my dog loves to say hi to people, but is "hand shy" so NO PETTING at all. No touching from strangers. Not worth the risk. Tell them to please leave their hands relaxed at their sides, don't even make it look like they are going to pet her. So no extended hands to sniff, because that can freak a dog out. Or if the dog seems ok, the person can decide to pet the dog after all...and then the dog freaks out that the person touched them.
If they ask why no petting... you can say your dog is hand shy and you NEVER want to put her past her comfort level. That usually gets people to understand and not try to sneak a petting in on the dog.
Very hard. I am sorry Maya is having these issues. You can help her, but it is not easy and there is no fast fix. So all you can do for now is preventative measures.
The more you protect your dog by you controlling who touches her, her stress will be lessened as she thinks, "Oh, good, a stranger coming to us, now they will NOT pet me if I meet them. Whew! Thanks Mom!"