The Ten commandments starts with the truth that there is only one God and not other exists on the earth. That only God is YHWH and he is jealous God.
Ex 20:1-3 “I am YHWH”
While Israelite's were challenging Moses and "testing" God, for food and water. God has brought them out of Egypt and performed miracles. They never understood the purpose of God that they are "a treasured possession, a