Very sudden changes in behavior can be a sign that there's a medical problem, no matter how young or old the dog is. For example, she could have impaired vision, making it hard to recognize you and read your body language. She could also be in pain, making her shy away from touch to avoid more pain. Where this pain comes from is another question... There could also be problems in the brain. Only a vet could diagnose any of this.
This could also indicate a change in behavior in another person (or you). Dogs will react that way if someone in the household starts mistreating them. But it doesn't have to be abuse. When my grandma started getting dementia, the dog picked up on it before we did and suddenly didn't want to be in her room anymore. We are 100% certain that she never hurt the dog or obused her in any way, though. Maybe your behavior changed in ways you're not even aware of, but the dog noticed.
As mentioned in the comments, a change of smell can also cause this. Strong perfumes / deodorants are an obvious reason, but many drugs and medications can also change your personal smell. It could also be a smell you bring home from a friend or boy-/girlfriend.
Your posture may also influence the way she acts around you. Many people only bend their body down at the hips when interacting with a dog. But from the dogs perspective they are towering over them in a very scary and intimidating way. Whenever your dog acts scared of you, you should sit down on the floor instead of standing or crouching. That makes your posture much more friendly and you more approachable.
You should encourage her to come to you, but then give her time to explore you without touching her. If a smell or a noise (maybe from your clothing) triggered her, she then has the opportunity to learn that whatever it is, it's not a bad thing. But she needs time to concentrate on that, and she can't concentrate when you touch her. You can speak to her in a very calm way, though.
You should monitor when these sudden lapses in trust occur and then recall anything that happened before it started. Have you moved in a certain way? Eaten certain foods or taken certain medications or drugs? Have you or the dog been with certain people? Has it been cold and wet outside? (This can influence painful conditions like arthritis.) Tra to find what caused this, then try to change it.