If we want something from God all we have to do is ask (Matthew 7:7-11). In Matthew 6:24-34, Jesus says that God will provide all our needs like food and clothing, but we must seek first the kingdom and trust him to take care of us like he does the animals and plants. He continues in Matt 7:9, that God gives generously like any father to his children, and when his child asks for bread, they will get bread and not a stone. He wants to give us the good things that we ask for. Even things like wisdom are available, Solomon asked for wisdom, and God answered and blessed him with more than just that (1 Kings 3:3-14).
James 1:5-8 says that if anyone lacks wisdom they can ask God for it and God will give it generously but that person must ask in faith not wavering. It continues that people who waver in faith should not expect to receive anything from him. This is a conditional statement, which says we must believe to receive. Jesus says that nothing is impossible for God (Matthew 19:26, Mark 9:23), and James is reminding us that we must believe that when we ask. This applies to what Jesus said in Matthew 7:7-11. Jesus repeats this concept when he curses the fig tree in Mark 11:15-24, and he says, “say to any mountain in faith to be moved and it will be moved”, but he concludes the lesson of faith by saying that “there must be no doubt in your heart”.
Lastly, Hebrews 11:6 says that without faith it is impossible to please God and that anyone who wants to come to him must believe that God is capable of doing what they need and rewards those who sincerely seek him. We must trust (have faith) in God in order to receive from him.