We are charged with bringing every thought to the captivity of Christ.
…casting down arguments and every high thing that exalts itself against the knowledge of God, bringing every thought into captivity to the obedience of Christ… (2 Corinthians 10:5)
We are also charged, if we want to have our prayers answered, to not doubt.
Assuredly, I say to you, if you have faith and do not doubt, you will not only do what was done to the fig tree, but also if you say to this mountain, ‘Be removed and be cast into the sea,’ it will be done. And whatever things you ask in prayer, believing, you will receive.” (Matthew 21:21-22)
The capture of thoughts is crucial to maintaining focused faith.