The first book of the Torah is called Bereshith (Genesis) and contains only three laws. It traces the primeval history of the world starting with the creation of the world, Adam and Eve in the Garden of Eden, Cain and Abel and Noah and the flood. Afterwards the focus shifts to the history of the Children of Israel covering the three Patriarchs; Abraham, Isaac and Jacob, and the four matriarchs; Sarah, Rebekah, Leah, and Rachel. It concludes with the rivalry between Jacob’s ten sons and his favored son Yosef.
Rashi on Genesis 1:1

1 בראשית IN THE BEGINNING — Rabbi Isaac said: The Torah which is the Lawbook of Israel should have commenced with the verse (Exodus 12:2) “This month shall be unto you the first of the months” which is the first commandment given to Israel. What is the reason, then, that it commences with the account of the Creation? Because of the thought expressed in the text (Psalms 111:6) “He declared to His people the strength of His works (i.e. He gave an account of the work of Creation), in order that He might give them the heritage of the nations.” For should the peoples of the world say to Israel, “You are robbers, because you took by force the lands of the seven nations of Canaan”, Israel may reply to them, “All the earth belongs to the Holy One, blessed be He; He created it and gave it to whom He pleased. When He willed He gave it to them, and when He willed He took it from them and gave it to us” (Yalkut Shimoni on Torah 187).
2 בראשית ברא IN THE BEGINNING GOD CREATED — This verse calls aloud for explanation in the manner that our Rabbis explained it: God created the world for the sake of the Torah which is called (Proverbs 8:22) “The beginning (ראשית) of His (God’s) way”, and for the sake of Israel who are called (Jeremiah 2:3) “The beginning (ראשית) of His (God’s) increase’’. If, however, you wish to explain it in its plain sense, explain it thus: At the beginning of the Creation of heaven and earth when the earth was without form and void and there was darkness, God said, “Let there be light”. The text does not intend to point out the order of the acts of Creation — to state that these (heaven and earth) were created first; for if it intended to point this out, it should have written ‘בראשונה ברא את השמים וגו “At first God created etc.” And for this reason: Because, wherever the word ראשית occurs in Scripture, it is in the construct state. E. g., (Jeremiah 26:1) “In the beginning of (בראשית) the reign of Jehoiakim”; (Genesis 10:10) “The beginning of (ראשית) his kingdom”; (Deuteronomy 18:4) “The first fruit of (ראשית) thy corn.” Similarly here you must translate בראשית ברא אלהים as though it read בראשית ברוא, at the beginning of God’s creating. A similar grammatical construction (of a noun in construct followed by a verb) is: (Hosea 1:2) תחלת דבר ה’ בהושע, which is as much as to say, “At the beginning of God’s speaking through Hosea, the Lord said to Hosea.” Should you, however, insist that it does actually intend to point out that these (heaven and earth) were created first, and that the meaning is, “At the beginning of everything He created these, admitting therefore that the word בראשית is in the construct state and explaining the omission of a word signifying “everything” by saying that you have texts which are elliptical, omitting a word, as for example (Job 3:10) “Because it shut not up the doors of my mother’s womb” where it does not explicitly explain who it was that closed the womb; and (Isaiah 8:4) “He shall take away the spoil of Samaria” without explaining who shall take it away; and (Amos 6:12) “Doth he plough with oxen,” and it does not explicitly state, “Doth a man plough with oxen”; (Isaiah 46:10) “Declaring from the beginning the end,” and it does not explicitly state, “Declaring from the beginning of a thing the end of a thing’ — if it is so (that you assert that this verse intends to point out that heaven and earth were created first), you should be astonished at yourself, because as a matter of fact the waters were created before heaven and earth, for, lo, it is written, (v. 2)

“The Spirit of God was hovering on the face of the waters,” and Scripture had not yet disclosed when the creation of the waters took place — consequently you must learn from this that the creation of the waters preceded that of the earth. And a further proof that the heavens and earth were not the first things created is that the heavens were created from fire (אש) and water (מים), from which it follows that fire and water were in existence before the heavens. Therefore you must need to admit that the text teaches nothing about the earlier or later sequence of the acts of Creation.
3 ברא אלהים GOD [AS JUDGE] CREATED — It does not state ‘ברא ה “The Lord (the Merciful One) created, because at first God intended to create it (the world) to be placed under the attribute (rule) of strict justice, but He realised that the world could not thus endure and therefore gave precedence to Divine Mercy allying it with Divine Justice. It is to this that what is written in (Genesis 2:4) alludes — “In the day that the Lord God made earth and heaven”.