Allah the Exalted said: (Verily, We have created all things with Qadar (Divine Preordainments of all things before their creation, as written in the Book of Decrees Al-Lauh Al-Muhfudh)) (The Noble Qur’an Al-Qamar 54:49)
The companion Abdullah ibn Amr said that the Prophet said: (Allah wrote down the decrees fifty thousand years before He created the heavens and the Earth and his Throne was above the water.) (At-Tirmidhi, declared sound by Al-Albani)