This is a question I’ve often asked myself so thanks for giving me the chance to work it out.
Firstly, Jesus obeyed the Law perfectly in a way that the Israelites never had. When Satan tempted Jesus to sin, Jesus refused based on what God said in the Law (Matt 4:1-10). Jesus is the perfect Israelite.
Secondly, the Law never assumed that the Israelites would be perfect. Although they deserved to die for their sin God set up a system where an animal would die on their behalf. Now, an animal can never really take the place of a human. But God was pointing the way forward to when he would deal properly with sin through his perfect son, Jesus. Jesus died in the place of sinners. Matthew shows us why Jesus died in the story of Barabbas where the guilty man goes free but the innocent Jesus dies (Matt 27:15-26). The New Testament makes it clear that if we put our trust in Jesus as our saviour we no-longer face the penalty for our sin. Instead, Jesus has taken this penalty on himself. If we don’t trust him, we must take the penalty ourselves (John 3:36).
Thirdly, the Law predicted a time when the Israelites would turn away from God to such a degree that God would kick them out of the land he was giving them. They would go into exile. But the Law also promised that God would bring them home and deal with their sin by cleaning up their hearts. Then they’d finally love God with all their hearts (Deuteronomy 29:1-30:10). That promise was fulfilled in Jesus. Jesus expects his followers to live a righteous life because of what he’s done to their hearts (Matthew 5:20).
This doesn’t mean we need to obey the Law in the same way as Israel. It was given to Israel to show them their sin and prepare them for the arrival of Jesus. But we are expected to obey the principle of the Law, which is love. This is much harder. Notice how Jesus takes parts of the Law draws out the loving principal (Matt 5:21-42).
It also doesn’t mean we’re expected to be perfect this side of Heaven. We need to constantly rely on Jesus for forgiveness while also relying on him to change our hearts and help us do good. Have you asked Jesus for both these things?