Like other said, prayer is communication.
And it is 2 way communication: you to God, and God to you.
The first part is easy to swallow, the second part is sometimes (if not often) seems hard and bitter.
We need to start praying anyway. When I was a kid, the only prayer I know is petition to get what I want. God is kinda of vending machine wish granter. I collected novenas, prayers, all things that people said powerful to get my wish come true.
For a child, God granted what is a child able to grasp.
But we get older, we mature. But too bad sometimes we are maturing physically, emotionally, but not spiritually. We are asked to be like children before God, but not childish forever.
So here comes the second part of communication. God start communicate with us, by not granting some petition we ask. He knows better, we don’t.
His response will agitate us. He prompt us to know him better, first and foremost. To leave aside our notion of “my vending machine God.”
I know I need to pass that too. Struggling to know or understand God. We know God better, little by little.
Sometimes some petitions were granted in a way beyond what I asked. And I feel wonder, grateful, close to God.
Sometimes some petitions were granted, delayed. Then I need to ask, why Lord? And start reflecting the whole situation.
Sometimes some petitions were never granted. Then I feel agitated. Then I need to again reflect and make a new decision: keep on following him even grudgingly, or have my own way.
Sometimes I did make my own way, and during the course feel God nudging and I returned.
Reflecting now and here, I see that not granting all my petitions the way I want, was actually a very big favor from God to know him better the way he is. At least, a first step to discard “my vending machine God” and start asking “who are you, Lord?”
It compels us to find answer, talk to spiritual director, share with others, read the Bible, read the saints, hear others, change our understanding or even way of praying, hear God better…
So now, I can pray from time to time, “for all petitions that were not granted, blessed are you Lord, and thank you.”