“And we know that in all things God works for the good of those who love him, who have been called according to his purpose (Romans 8:28).”
Not receiving what you prayed for is disheartening but that does not mean giving in to despair. Things don’t always go our way and there will be times when we will experience disappointment.
As Christians we live by faith and the belief that God will not withhold good things from us so we have to believe that what we wanted, what we prayed for does not align with God’s “good thing”. It’s a hard pill to swallow but one that if we will ingest it will render the good and perfect will of God.
Things won’t always go your way but it’s what you do afterwards that matters. Don’t put more trust in your limited wisdom that you miss the ultimate plan of God.