No one has ever been saved by following the Law. That is the whole point of the Gospel. Those saved prior to Christ have been saved solely by Grace. Salvation by Grace is not a new system. The Law condemns all because all have broken it.
Can you name one person in the Bible that you think might have been saved by following the Law?
If ye have heard of the dispensation of the grace of God which is given me to you-ward. (Ephesians 3:2)
Now we know of course that all those of the Old Testament were also saved because of their faith but they were also under the law. Not just the ten commandments but also all the moral law, the Ten Commandments governed the moral conduct of the nation of Israel. The civil law, that governed the social conduct of the nation of Israel. The dietary law, that governed the health of the nation of Israel. And the ceremonial law, that governed the religious conduct of the nation of Israel.
Perhaps I could have used a different word. What word would you have used to better discribe?