When we make du'a, put the highest trust in Him. It is as though we're telling Allah, "here I am submitting to you, steer my life for me".
Sometimes Allah doesn't give because He knows what is good and what is not good for us. Taking a 2 year old asking for a knife from the mother as an analogy, the mother is not giving the knife to the kid because she knows it is harmful while the kid know not. Only out of her mercy that she is protecting the kid.
Or taking a 10 year old asking us to let them drive the car as another example. Do we let? Or do we not let? Would we have let them if they were 18? Of course we do. The same thing with Allah. He gives when He knows when we are most ready.
Well of course Allah is above all analogy but yes, sometimes we, as weak and lack of knowledge as we are, ask Allah for a lot of knives. And we cry and cry asking for it. And we throw tantrums the adult way when Allah doesn't give.
We think He doesn't listen, He doesn't understand, that He likes to put us through misery. No. He is the Most Merciful as He claimed and you know He doesn't lie. And only through time that we understand what we begged for is beneficial, or harmful for us.
Sometimes He purposely delays what He wants to give us. Because He likes us begging. He likes listening to us asking from Him. He delays because He knows, in the time frame in which He delays what He has to give us, we gain nearness to Him. We gain this habit of asking Him when we're low, and when we're high.
In short, put enough trust in Him and He will guide us through it. Let Him take the steering wheel, let Him take over. If it is for or against us, the matter will be facilitated or be made an obstacle.