God is an awesome God and the Bible says that His ways are impossible for us to figure out. Our minds are too finite to be able to figure out the God Who made the Universe, but sometimes we try to do it anyway. When we pray and expect Him to answer, we have it all planned who we want Him to answer; and we have the nerve to get upset if it doesn't come out the way we planned. But God is omniscient, He knows everything and He knows what is best for us. He answers our prayers in the way that He knows what is best for us. You may have been praying for a certain job and didn't get it. Later you found that that company shut down. God already knew, and He always has something better in mind.
Have you ever followed your GPS and it suddenly wanted to take you in another direction, and you begin to complain and fuss wondering why it changed direction? So, you don't follow the GPS, you continue going in the same direction. Then you get down the highway and find that there is a backup in traffic because of an accident and wish you had gone the way the GPS was telling you to go. We do that with God, don't we? We say, "God can't be telling me to go this way, or do it this way, or say it this way, because that is not what I had planned." The Word of God says that we make plans but God is the One Who carries them out. We must learn to trust Him in everything, not just some things that seem easy, but in the hard things where there are disappointments and we can see no way it will work out for us. The Lord our God tells us that, His ways are not our ways, He doesn't think the way we think. "For My thoughts are not your thoughts, neither are your ways My ways, saith the LORD. For as the heavens are higher than the earth, so are My ways higher than your ways, and My thoughts than your thoughts." Isaiah 55:8-9.
God knew us before we were born into this world. He has special plans for each of us and He knows what He has to do to carry out those plans: and He is going to do it His way. We make choices in life, some good some bad, some right, some wrong. But God always gives us chances to get it right and to follow His will for us. How do we know His will? I'm glad you asked. God's will, is His Word. Read it, study it, meditate on it, and apply it to your life, and you won't go wrong. There is an old hymn of the church which sums it up so plainly:
"God moves in a mysterious way His wonders to perform; He plants His footsteps in the sea
And rides upon the storm.
Deep in unsearchable mines Of never failing skill He treasures up His bright designs And works His sovereign will.
Ye fearful saints, fresh courage take; The clouds you so much dread Are big with mercy and shall break In blessings on your head.
Judge not the Lord by feeble sense, But trust Him for His grace; Behind a frowning providence, He hides a smiling face.
His purposes will ripen fast, Unfolding every hour; The bud may have a bitter taste, But sweet will be the flower.
Blind unbelief is sure to err And scan His work in vain; God is His own interpreter, And He will make it plain." William Cowper, 1774.
"And we know that all things work together for good to them that love God, to them who are the called according to His purpose." Romans 8:28.