The thing is that all the worlds and the souls that exist and that are destined to be created with all their incidents until the end of their correction are all included in Ein Sof in their full measure and glory. (Baal HaSulam, Study of the Ten Sefirot, Chapter 1, Part 1, Restriction and Line)
This is about the fact that the upper light, which fills the entire reality, carries absolutely all the information about everything that has been, is, and will be. This gradually manifests before us, and we call it our world.
At the very beginning of creation, everything was flooded with one simple light, i.e., the emanation of the Creator’s complete love for future creations.
In other words, from the side of the Creator there is a thought of creation and absolutely everything is included into it up to the final state of each person.
From KabTV’s The Study of the Ten Sefirot (TES) 8/14/22