If you want God to say yes to your prayers, then you must pray according to the will of God. Jesus modeled this for us when He taught us to pray, "Our Father in heaven, hallowed be Your name. Your kingdom come. Your will be done on earth as it is in heaven" (Matthew 6:9–10).
Yet some people teach the opposite. They say that when you pray, you are to tell God what you want and ask for it by faith. You are to speak it into existence and not doubt. I've heard one teacher say, "Don't ever pray, 'Not my will, but Yours be done." But those who hold that view are mistaken.
Jesus, God in human form, taught us to pray, "Your kingdom come. Your will be done on earth as it is in heaven." I've learned that I don't always know what is right. That's why I'm glad my Heavenly Father, who knows all things and has my best interest at heart, will sometimes overrule my prayers for my own good.
Never be afraid to ask God to overrule your prayers if they happen to be outside of His will. Sometimes God may answer our prayers differently than we thought He would. But the objective of prayer is not to get God to do what we want to do. The objective of prayer is saying, "Lord, where are You going? I want to go there too. . . . What do You think about this? I want to think that too. . . . What is Your will on this? I want that to be my will too." We want to get our will in alignment with God's.
When we find God's will and start praying accordingly, we'll start seeing our prayers answered in the affirmative.