What about graven images?

I would just like to know where it is first mentioned in the Bible that it is a sin to worship or create a graven image. I know it’s in there more than once, just wondering when the first time it is mentioned is. Also, is it first mentioned in the Old or New testament. Thanks!

A graven image as in an image or statue of god that is worshiped as god. Thanks again.

Second book of the Bible, Exodus 20:4:

(And of course Exodus is part of the Old Testament.)