This is a question that I have always asked myself throughout my life. I assure that it is your question too. Setting aside the corresponding interpretations by various religions, how do you find a scientific response?
Did god create the universe for itself? No. According to religion, god is perfect and does not need any home !
Did god create the universe for us? Yes, based on the religious creeds. In this case for what?
I may answer that god created the universe because of its generosity?! If we believe the exquisite attributes of god.
Furthermore, life would be bitter and disappointing, if "Eternity" is not taken for granted.
Conversely, belief to the existence after terrestrial life grants us hope and motivation.