There are four passages in the Gospels in which Jesus promises us that the Holy Spirit will put words of wisdom in our mouths that cannot be opposed (Mt 10:17-20; Mk 13:9-11; Lk 12:11-12; 21:12-15). In each passage, the context is that a disciple has been involuntarily detained to be put on trial for their witness to Jesus. Jesus promises us: "In that hour, say what you are inspired to say. It will not be yourselves speaking but the Holy Spirit" (Mk 13:11).
We may never be arrested and brought to court for our faith in Jesus, but as disciples of Jesus, we will face persecution (2 Tm 3:12). The world will attempt to intimidate us and prevent us from speaking about Jesus (see Acts 5:28, 40). "Do not let them intimidate you" (Mt 10:26).
If we believe Jesus when He tells us that the Holy Spirit will speak through us, we will be bold and fearless witnesses. We will count our trials as pure joy (Jas 1:2), for we know Jesus will give us words and wisdom which cannot be opposed by our persecutors (Lk 21:15). Persecution will only serve to further exalt Jesus.
Therefore, "resolve not to worry about your defense beforehand" (Lk 21:14). Instead, spend your time growing in faith, for "all depends on faith" (Rm 4:16). "Live in accord with the Spirit" every day (Gal 5:16), so that it will be second nature for you to "follow the Spirit's lead" (Gal 5:25).