What is the first commandment of God? The first commandment of God is: I am the Lord thy God; thou shalt not have strange gods before Me.
Thou shalt not have strange Gods before me. Thou shalt not make to thyself a graven thing, nor the likeness of anything that is in heaven above, or in the earth beneath, nor of those things that are in the waters under the earth. (Exodus 20:3-4)
What are we commanded by the first commandment? By the first commandment we are commanded to offer to God alone the supreme worship that is due Him.
It is written, "The Lord thy God shalt thou worship, and him only shalt thou serve." (Luke 4:8)
Further reading: CCC 2084-2094