The right answer is: I don't know and neither does anybody else!
Genesis was not written as a Science text or as a history book. It actually says very little about the how of creation; nothing about the when ... But it is very clear that God created everything!
All scientific evidence and calculations reveal that the Universe came from nothing (Big Bang) and had a beginning. What caused the Universe or what existed before the Big Bang is a matter of faith. A person either believes there was nothing and the Universe caused itself (logically impossible) or a person believes in a supernatural entity that exists outside of time, space and matter.
Either way, it's a matter of faith. Choose well,