"When a believer invokes Allah but his supplication(dua) is not answered, even though he may repeat it for a long time. In such case, he should understand that this is a test that requires him to be patient. The wisdom of Allah is proven by unquestionable proofs, hence you may assume the benefit in a matter while, in fact, the wisdom of Allah states otherwise. There might be benefit to you when the answer of your supplication is delayed and may cause you harm should the prayer have been immediately answered. The Prophet ﷺ said, "The slave (of Allah) will be fine so long he is not hasty and says "I supplicated but my prayers were not answered""