Genesis 1:1-2says, “In the beginning God created the heavens and the earth. The earth was without form and void and darkness was upon the face of the deep. And the Spirit of God was hovering over the face of the waters.”
I have heard the gap theory before. With all due respect, all that’s happening here in verse two is a statement of the conditions as God creates the heavens and the earth. I have heard of the belief that there was some long period of time in between the two verses but again verse 2 is just a statement of the existing conditions just before He spoke light into existence.
If you consider the implications of huge periods of time in between the verses it lends to a belief of another created order of things which lived and died before Adam and Eve’s sin. The problem with this is that there was no death until sin. Genesis 1:31 upon completion of His creation says, “Then God saw everything that He had made, and indeed it was very good.” Creation was “very good” until sin.
Romans 5:12 says, "Therefore just as through one man sin entered the world,and death through sin, and thus death spread to all men, because all sinned-’ We know that the ground was cursed as a result of sin from Genesis chapter 3, and that the “whole creation groans and labors with birth pangs together until now” from Romans 8:22.
Be careful of any theory that promotes the idea of death before sin, they are unbiblical.