He gave the people 600+ laws to show how pure he is. How their won’t be a speck of darkness in his kingdom. So people go and try to do the law, and think that by doing the law they will be counted as holy, righteous and will be rewarded with the kingdom of God because of their obedience.
However, God wants you to believe in him instead of putting faith in your works. He still wants you to keep the 10 commandments because those are focused on loving God and our neighbor as well as the way we live to please God.
In contrast, to the 600+ laws their is no way that people are keeping those laws. God knew people couldn’t but they didn’t want a relationship with him at the time so he gave them what they wanted. God told Moses to have the people come up and talk to me themselves. He wanted them to have a relationship with him; and that will be the way they will be saved and get into the kingdom. By having faith and trusting in God. Because we you are in a relationship with someone, you trust and believe someone will do good by you and that’s actually what God intentions were