Deuteronomy 18:21-22 - 21 And if you say in your heart, ‘How may we know the word that the Lord has not spoken?’— 22 when a prophet speaks in the name of the Lord, if the word does not come to pass or come true, that is a word that the Lord has not spoken; the prophet has spoken it presumptuously. You need not be afraid of him.
The context of this passage is the coming of the Messiah, the coming prophet who will speak the words of God. The question is then anticipated, "How do we know if the Lord has spoken?" And the reply is if the words do not come true, you do not need to fear or be afraid of him. There have been many false prophets that have come since then, proclaiming when the day of the Lord will come back, teaching different religions and doctrines and teaching things that are evil like witchcraft and demonism, but God reassures us here that there is nothing that can cause fear compared to the power and sovereignty of God. Nothing is greater than God and in him only, need we fear.
Exodus 9:30 -But as for you and your servants, I know that you do not yet fear the Lord God.”