20 Moses said to the people, “Do not be afraid. God has come to test you, so that the fear of God will be with you to keep you from sinning.”

Read Exodus 20:20 Using Other Translations

And Moses said unto the people, Fear not: for God is come to prove you, and that his fear may be before your faces, that ye sin not.
Moses said to the people, "Do not fear, for God has come to test you, that the fear of him may be before you, that you may not sin."
“Don’t be afraid,” Moses answered them, “for God has come in this way to test you, and so that your fear of him will keep you from sinning!”