The Holy Bible is the most important book ever written. It is the word of God.
Both chapters start with the words “In the beginning”. The gospel of John deals with creation spiritually, and Genesis 1 deals with the physical creation, but with a spiritual emphasis, laying the groundwork for spiritual understanding of how and why we exist.
We are existing in time and space. The question is: What was there before time and space existed, before the beginning?
Answer: God, existing in three persons, God the Father, God the Son (the Word) and God’s Spirit, (the Holy Ghost).
They alone are eternal, everything else, including time and space, is created.