Exodus 20:22 is a preamble and historical background for what follows. On the basis of God"s revelation on the mountain, the Israelites were to obey Him as follows. [source][source][source]
The Israelites were not to make idols representing gods other than Yahweh nor were they to represent Yahweh by making idols to help them worship Him ( Exodus 20:23). [source][source][source]