As I've researched, G-d has many creations, trillions of worlds before this world, and will create many after this world.
Why did G-d create this world?
Rabbi Sadia Gaon in his famous work אמונות ודעות says god created the world because he is good and wants to "bestow good". The premise being that he need the world in order to do good. I do not like this answer as it takes away from God being omnipotent. Moreover he endes off even worse in may opinion, see below. That being said, I haven't seen any better answer in my lifetime. I think this is one of those questions that we must leave unanswered and still believe.
this notion was used by Yaakov Shweky in a song:
Reference: רס"ג , אמונות ודאות, מאמר שלישי at the beginning:
Rabbi Tzvi Freeman has an excellent article entitled "What is the Purpose of Existence?" He thoroughly examines the classical answers to the question of G-d's purpose in creating the world (to reveal His abilities, to be able to practice good etc), and explains the difficulties with them, and concludes with the explanation offered by the Chassidic masters: