When we see in scripture the term, ‘the law’, it does not refer, in the absolute sense, the law which was actually written in stone and given to Moses; at times, it refers to the law that was in the garden with Adam. In this sense, can we see that when the scriptures as well speak of the ‘old covenant’, it is not speaking in the absolute sense and referring to the decalogue that was given to Moses, but the Covenant of Works that Adam was under. IMO, when the term is used in scripture to make a point and the mention of Moses is used or the tablets, etc, it is used in this way. Since the Mosaic is a gracious covenant, i.e. an administration of the covenant of grace, it cannot be seen as both a C of W’s and a C of G. This distinction is important! Hence, it must be referring back to the original C of W’s in a general sense.

For example:

2 Kings 17:13
13*Yet the LORD testified against Israel, and against Judah, by all the prophets, and by all the seers, saying, Turn ye from your evil ways, and keep my commandments and my statutes, according to all the law which I commanded your fathers, and which I sent to you by my servants the prophets.

2 Kings 17:37
37*And the statutes, and the ordinances, and the law, and the commandment, which he wrote for you, ye shall observe to do for evermore; and ye shall not fear other gods.

2 Chronicles 14:4
4*And commanded Judah to seek the LORD God of their fathers, and to do the law and the commandment.

Ezra 7:10
10*For Ezra had prepared his heart to seek the law of the LORD, and to do it, and to teach in Israel statutes and judgments.

Ezra 7:26
26*And whosoever will not do the law of thy God, and the law of the king, let judgment be executed speedily upon him, whether it be unto death, or to banishment, or to confiscation of goods, or to imprisonment.

Ezra 10:3
3*Now therefore let us make a covenant with our God to put away all the wives, and such as are born of them, according to the counsel of my lord, and of those that tremble at the commandment of our God; and let it be done according to the law.

Psalm 1:2
2* But his delight is in the law of the LORD;
And in his law doth he meditate day and night.

Psalm 19:7
7* The law of the LORD is perfect, converting the soul:
The testimony of the LORD is sure, making wise the simple.

Psalm 37:31
31* The law of his God is in his heart;
None of his steps shall slide.

I am sure you agree that Adam had the law.

Romans 2:12
12*For as many as have sinned without law shall also perish without law: and as many as have sinned in the law shall be judged by the law;

Romans 2:18
18*And knowest his will, and kapprovest the things that are more excellent, being instructed out of the law;

Romans 5:13
13*(For until the law sin was in the world: but sin is not imputed when there is no law.

M. Henry:
‘The design of what follows is plain. It is to exalt our views respecting the blessings Christ has procured for us, by comparing them with the evil which followed upon the fall of our first father; and by showing that these blessings not only extend to the removal of these evils, but far beyond. Adam sinning, his nature became guilty and corrupted, and so came to his children. Thus in him all have sinned.’

JFB:
’13, 14. For until the law sin was in the world—that is during all the period from Adam “until the law” of Moses was given, God continued to treat men as sinners.
but sin is not imputed where there is no law—”There must therefore have been a law during that period, because sin was then imputed”; as is now to be shown.’

Poole:
‘It appears that all have sinned, because sin was always in the world, not only after the law was given by Moses, but also before, even from the beginning of the world till that time.’