God gathered Israel before him at Mount Sinai to speak to them and give them his commandments statues and judgments, however by the time God had spoken to them the tenth commandment the fear of the people was so strong that they no longer wanted to hear directly from God. Every other commandment was then given to Moses and given to Israel.
Deut 5:22 These words The LORD spake unto all your assembly in The mount out of The midst of The fire, of The cloud, and of The thick darkness, with a great voice: and he added no more. And he wrote Them in two tables of stone, and delivered Them unto me.
23 And it came to pass, when ye heard the voice out of the midst of the darkness, (for the mountain did burn with fire,) that ye came near unto me, even all the heads of your tribes, and your elders;
24 And ye said, Behold, the LORD our God hath showed us his glory and his greatness, and we have heard his voice out of the midst of the fire: we have seen this day that God doth talk with man, and he liveth.
25 Now therefore why should we die? for this great fire will consume us: if we hear the voice of the LORD our God any more, then we shall die.
26 For who is there of all flesh, that hath heard the voice of the living God speaking out of the midst of the fire, as we have, and lived?
27 Go thou near, and hear all that the LORD our God shall say: and speak thou unto us all that the LORD our God shall speak unto thee; and we will hear it, and do it.
28 And the LORD heard the voice of your words, when ye spake unto me; and the LORD said unto me, I have heard the voice of the words of this people, which they have spoken unto thee: they have well said all that they have spoken.
29 O that there were such an heart in them, that they would fear me, and keep all my commandments always, that it might be well with them, and with their children for ever!
30 Go say to them, Get you into your tents again.
31 But as for thee, stand thou here by me, and I will speak unto thee all the commandments, and the statutes, and the judgments, which thou shalt teach them, that they may do them in the land which I give them to possess it.
32 Ye shall observe to do therefore as the LORD your God hath commanded you: ye shall not turn aside to the right hand or to the left.
33 Ye shall walk in all the ways which the LORD your God hath commanded you, that ye may live, and that it may be well with you, and that ye may prolong your days in the land which ye shall possess.
When God therefore speaks of the law of Moses and obedience to it God is not Just referring to the first ten.