God sovereignly chose his people before time itself.
Paul says, “Before the foundation of the world” (Eph 1:4). Before creation, the fall of man, the covenants, the law—before everything, God determined that he would choose a people for himself and provide the means for their redemption.
Since God is not bound by time—he created time—he had it within his power to see everything that would transpire before it did. He knew that man would sin, and he knew everyone who would eventually be born into this world. So even before he created us, he chose a people for salvation.
God is not making things up as he goes. His plans have been fixed for all eternity. Revelation says that our names were written before the foundation of the world in the book of life of the Lamb who was slain (Rev 13:8). According to Peter, that Lamb was foreknown before the foundation of the world even though he was not made manifest until much later (1Pe 1:20). In short, the entire plan of redemption was firmly set even before God created the heavens and the earth (Ge 1:1).