(click on the chapter to begin reading) both start with the words “In the beginning”. The gospel of John deals with creation spiritually, and Genesis 1 deals with the physical creation.
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.