Prayer is an act of trust
When we are suffering afflictions, we do not to know how to pray as we ought. Because they are hard to endure and painful, because they are contrary to our nature (which is weak) we, like all mankind, pray to have our afflictions taken from us.
If the Lord does not take our afflictions away we should not consider ourselves ignored and neglected, but should hope to gain some greater good through the patient acceptance of suffering.
If we are not given what we ask for, it might be that what we have been asking for could have brought us some still greater affliction, or it could have brought us the kind of good fortune that brings corruption and ruin. It is clear that we cannot know how to pray as we ought.
Hence if anything happens contrary to our prayer, we ought to bear the disappointment patiently, give thanks to God, and be sure that it was better for God’s will to be done than our own. Jesus himself has given us an example of this. When he prayed, "My Father, if it is possible, let this cup pass me by", he transformed the human will that was in him because he had assumed human nature and added "Nevertheless, let it be as you, not I, would have it".
(Until here excerpts from St Augustine's letter to Proba)
The obedience of Jesús shows us the way to live. Whatever happens, we ask whatever we think is best, but we add: "Nevertheless, let it be as you, not I, would have it". We make an act of trust. We put ourselves in His hands. Not with resignation, but with curiosity. Let us see, Lord, how are you going to sort this out.