Have you ever thought or felt that you have been praying for a long time or maybe you have just started praying to god but they go answered? This is possible and maybe because of some reasons which are stated in Narad puran which is the ancient text it has been that what is the right way of praying so they get answered.
Basically there are four things which do not allow the prayers to get answered.
First: You have started praying because someone asked you to start praying to god and this someone could be your wife, parents, and relatives. They may pressurize to perform rituals and also to visit temples keep fast, etc. But if you offer such prayers then they will not bring any benefits until and unless you yourself start believing in them and have firm belief. So have faith and pray with your heart and soul your prayers will definitely get answered.
Second: Praying because you are afraid
Often people start praying out of fear or when they are afraid of god and think that if they will not pray then god will get angry and will not bless them. It is better not to pray of you offer your prayers out of fear of not getting what you desire of because you will not get positive results under pressure.
Third: Not having complete knowledge
If performing rituals in wrong way then also prayers get answered as the lack of knowledge of performing the ritual may also result negatively. So the best way of doing is a simple form of Pooja if you do not have proper knowledge or information of doing it.
Fourth: Praying because of greed in you
Remember that if you are praying out of greed than also there are high chances that your prayers do not get answered. If your only motive of praying is just to have money, profit or personal life then it means that you are not devoting yourself fully to god and praying with these thought will not bear any fruits.