Translation based on https://www.sefaria.org.il/Genesis.1.2?lang=he&aliyot=0&p2=Rashi_on_Genesis.1.1.1&lang2=en&w2=all&lang3=en
The First Comment by Rashi on the Torah
בראשית IN THE BEGINNING — Rabbi Isaac said: The Torah which is the Law book 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).