Let the cow look at you, smell you, before you attempt to touch its head or body. Move slowly not to scare her. Pay attention to your body language and learn to read hers. If she doesn't want to be touched and shows sign of anxiety, don't push it. Use a calm voice. Start small and from an distance (you don't need to touch her on the first day, just interact from a short distance) and she will trust you more and more, as long as you respect her boundaries and her personal space ! Offering food would also probably help a lot as with most animals. Cows like apples and bananas, and probably a lot more things.
source: I petted quite a few animals in my time.
I once have been "pushed away" by a cow I was petting, nothing violent, but I felt how strong she was. If you engage with them, be aware that a big animal like this is really strong, heavy and occasionally fast, and that can surprise you. Also do not approach the cow directly from the back as that is a blind spot for them and it will make them nervous.
Here's a document explaining the basics of cow body language. Easy to read and with informative pictures:
And another link with info on body language of cows and bulls here:https://nature.berkeley.edu/ucce50/ag-labor/7article/article29.htm
here are some quotes from that second one
You can get clues to a cow�s mood and condition by observing the tail.
When the tail is hanging straight down, the cow is relaxed, grazing,
or walking, but when the tail is tucked between the cow�s legs, it
means the animal is cold, sick, or frightened. During mating, threat,
or investigation, the tail hangs away from the body. When galloping,
the tail is held straight out, and a kink can be observed when the
animal is in a bucking, playful mood.
how to flee them
If cornered by a bull, it is best not to move too fast, but to back
away from the bull�s flight zone which is about 20 feet in range.
While moving away from the bull�s flight zone, you should watch the
bull at all times until you get to a fence, crawl space, or other safe
retreat. Turning and running invites being chased.
The threat display of the bull puts him in a physiological state of
fight or flight. The threat display often begins with a broadside view
with back arched to show the greatest profile, followed by the head
down, sometimes shaking the head rapidly from side to side, protrusion
of the eyeballs, and erection of the hair along the back.
The direct threat is head-on with head lowered and shoulders hunched
and neck curved to the side toward the potential object of the
aggression (Photo 2). Pawing with the forefeet, sending dirt flying
behind or over the back, as well as rubbing or horning the ground are
often components of the threat display