There are at least three main strands of law codes found in the Torah.
Book of Covenant: Exodus 21-23
Here we have texts that are connected strongly to the Code of Hammurabi, with code intertwined that is related to the protection of those on the margin.
Deuteronomic Law: Deut. 12-26
The Deuteronomic Law Code legislates a one central place of worship. It assumes that the people under the law are living in the land God gave. It is probably from the time of Josiah (621 BCE) and is perhaps part of the law reclaimed/found by the prophetess Huldah. It is a Yahweh and Jerusalem focused law.
Holiness Code: Leviticus (some of it anyway)
It is likely written later than the other. It is seen as part of the priestly source of the OT. Some of the laws might have been older than the written form it appears in.