Ephesians 4:29. Let no corrupt communication proceed out of your mouth, but that which is good to the use of edifying, that it may minister grace unto the hearers. And grieve not the holy Spirit of God, whereby ye are sealed unto the day of redemption.
A wise person once said, “You may have something on your heart to say, but do you have an unction from the Holy Spirit to say it?”
An unction is an anointing, or in this case, a leading.
In other words, you may want to say something, but is the Holy Spirit leading you to say it? That requires discernment. That requires knowing the difference between your spirit and your mind; between your spirit and your emotions.
If the Spirit of God is leading you to say it, it will bring life and blessing. If not, it will bring death, because death and life are in the power of the tongue.
Learn to speak words that edify and build you up. Learn to say words that register positively on your own spirit.
If you’ll feed your spirit by meditating on the Word of God and pray consistently in other tongues, gradually you will become more and more aware of your own spirit and of the leading of the Holy Spirit from within.
Then you’ll be able to speak when there is an unction to speak, and remain silent when there is not.