There was no religion of the Jews until the law was given by Moses. The first five books of the Old Testament are about the Jewish law and religion. Before Moses gave the law the Old Testament saints were justified by faith in God's promise of a savior, Romans 4:3. The same way that we are justified today. They looked forward to seeing the savior, while we look back.
Actually, they were worshipping the God of their fathers way before the Law.
An example:
Exodus 4:31 And the people believed: and when they heard that the LORD had visited the children of Israel, and that he had looked upon their affliction, then they bowed their heads and worshipped.
That was way before their Exodus, let alone, before the Law at Sinai, sixteen chapters or so, later.
__________
Romans 4:3 For what saith the scripture? Abraham believed God, and it was counted unto him for righteousness.
What was it he believed?
Genesis 15:2 And Abram said, LORD God, what wilt thou give me, seeing I go childless, and the steward of my house is this Eliezer of Damascus? 15:3 And Abram said, Behold, to me thou hast given no seed: and, lo, one born in my house is mine heir. 15:4 And, behold, the word of the LORD came unto him, saying, This shall not be thine heir; but he that shall come forth out of thine own bowels shall be thine heir. 15:5 And he brought him forth abroad, and said,
Look now toward heaven, and tell the stars, if thou be able to number THEM: and he said unto him, So shall thy seed be. 15:6 And he believed in the LORD; and he counted it to him for righteousness.
Romans 5:6-8.