Therefore, just as sin came into the world through one man, and death through sin, and so death spread to all men because all sinned— 13 for sin indeed was in the world before the law was given, but sin is not counted where there is no law. 14 Yet death reigned from Adam to Moses, even over those whose sinning was not like the transgression of Adam, who was a type of the one who was to come. -Romans 5:12–14
This may very well be one of the more difficult passages of Paul’s letter to understand due to the complicated analogy he is trying to create and the interruptions in his thought to explain elements of his argument as he goes.
The analogy is of two Adams—two federal heads. The federal head of the fallen human race of men and the federal head of the new redeemed race of men. But before he finishes his analogy, he breaks off to explain how the Law and sin worked together for his analogy and in the real experience of humanity.
The first Adam, the father of humanity created in Genesis, brought sin—and by it death—to the whole human race. Once Adam sinned, all of his offspring were considered sinners, first by virtue of being the son of sinners and second by virtue of subsequent their actions.
For his analogy, he will show that Christ was righteous first by virtue of his being born of God and second by virtue of his faithfully keeping the law. But he must first explain that even though the Law would not come till Moses and would not be counted against man in the forensic sense, in reality we know it existed and was punished because people died between Adam and Moses.
Therefore these living between Adam and Moses sinned in reality because death is the wage for sinners, they would not sin like Adam (a type of Christ) who did not keep the law given to him (Don’t eat from the tree of the knowledge of good and evil in the garden).
In sum, those men living before Christ are all in Adam, and all who are in Adam are condemned as sinners because they are his offspring.