4 “You shall not make for yourself a carved image—any likeness of anything that is in heaven above, or that is in the earth beneath, or that is in the water under the earth; 5 you shall not bow down to them nor serve them. For I, the Lord your God, am a jealous God, visiting the iniquity of the fathers upon the children to the third and fourth generations of those who hate Me, 6 but showing mercy to thousands, to those who love Me and keep My commandments.”
Comment:
This commandment always provokes a lively discussion: is YHWH telling us not to make any likeness of anything at all, or is it just forbidden when the object being made is intended to be an idol? Does this commandment apply to two-dimensional representations (paintings, drawings) or just to 3D sculptures? It is clear that idolatry is being forbidden here, and that is what makes the status of this commandment green. But does it go further than that?
Word Study:
Consider the Hebrew word for image and likeness used in this context. There are four words for image in ancient Hebrew. צלם (tselem as in Genesis 1:26), דמות (demut as in Genesis 1:26), פסל (pesel as in Exodus 20:4) and תמונה (temunah as in Exodus 20:4)
צלם (tselem)
This word is derived from the parent root צל (tsal) meaning a shadow. Tselem is the outline or shape of a shadow.
דמות (demut)
The parent root דם (dam) is blood. One descended from the “blood” of another often resembles the one descended from. Derived from the parent root דם the child root דמה (damah) meaning “to resemble” The word דמות (demut) means a resemblance or to be like something else in action or appearance.
פסל (pesel)
This word comes from the root פסל (pasal) meaning “to carve” and is usually used in the context of carving out a statue. A pesel is a carved image, usually something that is worshiped.
תמונה (temunah)
This word comes from the root מין (miyn) meaning a species. Because all animals of the same species look alike the word temunah, derived from miyn, means a likeness.
You shall not make for yourself a graven image [pesel], or any likeness [temunah] of anything that is in heaven above, or that is in the earth beneath, or that is in the water under the earth; (Exodus 20:4, RSV)
If this command prohibits the making of statues, paintings, figurines, photographs, etc., how could God instruct Moses to make an image of a serpent (Numbers 21:8) or Cherubiym (Exodus 25:18) on the cover of the ark?
There is a clue in the next verse suggesting the answer is that forming the images is not the problem but bowing down and serving them is:
you shall not bow down to them or serve them; for I the LORD your God am a jealous God, visiting the iniquity of the fathers upon the children to the third and the fourth generation of those who hate me (Exodus 20:5, RSV)
Source: https://www.ancient-hebrew.org/studies-words/hebrew-words-for-image.htm