For the person who keeps all of the laws except one is as guilty as a person who has broken all of God's laws.
— James 2:10
The Ten Commandments were not given to make us holy; they were given to show us that we are not holy. The commandments were given to show us that we need Jesus. The Bible says they are like a schoolmaster (kind of an old King James word). The idea is that of a disciplinarian. The commandments were given to say, in essence, "You can't do this on your own."
They are like a moral mirror. When you look at them, you say, "Uh-oh. I'm not measuring up." Every one of us has broken the commandments.
Someone may say, "Yeah, that might be true, but I haven't broken that many. I've only broken a couple of them."
Maybe. Or maybe not. The Bible says, "For the person who keeps all of the laws except one is as guilty as a person who has broken all of God's laws" (James 2:10). If you have broken even one commandment, it's enough to keep you from God and to separate you from Him.
The commandments were given to drive us into the open arms of Jesus. That's why Jesus said, "Come to me, all of you who are weary and carry heavy burdens, and I will give you rest" (Matthew 11:28).
Have you ever been carrying around something that was very heavy and had someone say, "Here, let me take that from you"? That is what Jesus is saying. "Let Me lift that load. Let Me ease your pain. Let Me give you relief. Right now. Come to Me," He says.
That is the message of what happened at the Cross. He died for our sins and paid the price for every wrong we have ever done. And if we will turn from our sins and believe in Him, then we will be forgiven.