The mind is generally ruled by your flesh, but when you are spirit filled, something changes, your mind becomes aligned to God’s spirit.
Most christians get to that stage when they desire to yield their minds to God, as they have yielded their lives to him.
The leading of the spirit is a catalyst for desiring to renew your minds, but yet many christians struggle with this one thing. Then this leads to people feeling guilty that their mind is everywhere and anywhere, once the feeling of guilt overcomes them, they get into this cycle of feeling guilty whilst they continue in futile thinking.
I’m a victim of this vicious cycle. One thing that helped was using scriptures to fight thoughts that I perceived were not from God. Bible verses were:
Finally, brethren, whatever things are true, whatever things are noble, whatever things are just, whatever things are pure, whatever things are lovely, whatever things are of good report, if there is any virtue and if there is anything praiseworthy—meditate on these things. The things which you learned and received and heard and saw in me, these do, and the God of peace will be with you.
Philippians 4:8-9 NKJV
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,
II Corinthians 10:5 NKJV
If indeed you have heard Him and have been taught by Him, as the truth is in Jesus: that you put off, concerning your former conduct, the old man which grows corrupt according to the deceitful lusts, and be renewed in the spirit of your mind, and that you put on the new man which was created according to God, in true righteousness and holiness.
Ephesians 4:21-24 NKJV
I know it is hard to adopt this way of thinking but it is possible, if you fully rely on God to help you and make an effort to put it into practice.
My mind used to wander and think on things that were lustful, negative, and useless. A good thing which helped me was guarding my heart. I would advice you to keep check on what you are listening to and watching. If you always watch reality shows, watch gossip news, listen to trap music; watch romantic movies with sexual content in it or even action movies with a lot of violence. Don’t be surprised if your mind is dwelling on those things, because subconsciously, the hidden messages are being stored in your mind as you watch or listen.