There is a major problem when we can't know the laws we are living under and are held responsible for it. There is a difference between "don't know the law," and "can’t know the law."
God says you do know his laws. You can't use the excuse that you didn't know his laws, any more than you can use that excuse with the tax authorities in your country. They will say, "Ignorance of the law is no excuse," because it was your responsibility to find out what the law was and keep it!
How do you know God's law? Even if you have not heard his commandments you have God's law written in your hearts. Intuitively and innately, your heart and conscience already carry the basics of God's expectations of you. That is why when you do wrong, your heart accuses you. When you do right, it defends you. It is the law written in your heart. You already know God's laws in broad outline.
But you also need to know the God of the laws to find the power to keep them, and His forgiveness when you fail.