the reply is that the obstacle lies with you. Supplication is one of the means, and the outcome will appear only when the impediments are removed. It may be that some barrier has prevented your prayer from being answered. Perhaps you prayed with a heedless, inattentive heart—so how can a distracted heart expect a response? as mentioned in the hadith. Or perhaps you eat what is unlawful, drink what is unlawful, and clothe yourself in what is unlawful. Concerning such a person the Prophet (peace and blessings be upon him) said: “He sets out on a long journey, disheveled and dust-covered, raising his hands toward the sky, crying, ‘O Lord, O Lord, O Lord,’ yet his food is unlawful, his drink is unlawful, and he is nourished with the unlawful—so how can he be answered?” (1)
Or he may be supplicating for something sinful or for cutting off family ties; in that case he will not be answered. That is one aspect.
A second aspect is that Allah, exalted is He, knows best what benefits you: He may hasten the response, delay it, or avert from you an equivalent evil, while you remain unaware. As the hadith says: “No person calls upon Allah with a supplication containing neither sin nor the severing of kinship but that Allah grants him one of three: He hastens the fulfillment of his request, He postpones it for him, or He turns away from him an equivalent harm.” (2)
The people of misguidance say, “There is no need to supplicate, for if a matter has been decreed there is no need for duʿāʾ; if something has been allotted to you, it will come to you even if you did not…"