The ten Commandments are the moral law God has given to us to show two things concerning the law
1. how to love God
2. how to love man
The context of salvation the law provides us the understanding we have broken the law and are to receive the judgment for breaking them = death and separation from God. The law produces NO GRACE only judgment. By God's law, we are all guilty.
No one can keep the law of God " all have sinned, and fallen short of the glory of God". Rom. 3:23 There is none righteous no not one Rom. 3:10
Jesus did for us what God and the law required, Blood and death.
God is Holy and sin from the beginning affects others something had to die for Adam & Eve to be covered read in Genesis.
God is also loving and merciful and that is why HE took our punishment and judgment onto Himself, To Him be all the glory.
One cannot keep what you have broken once, only judgment.
But as a born-again believer you keep the Ten not because only God said do not do or to do, YOu do so because You love Him and your neighbor. Jesus said To Love the Lord thy God with ALL. Doing so you keep all of them. In Christ, He has removed your transgression of the law and took unto himself your judgment. This is why the devil is so mad. God did for us what HE would not do nor will do for the devil and his angels
The devil aka satan the accuser comes before God saying " You so holy and judged me yet you left CS1 slide!
Jesus my mediator Has the testimony and evidence HE took my payment therefore Devil You still going to hell but not me