Abdullah bin Amr bin As reported,

I heard the Messenger of Allah ﷺ say, "Allah عز وجل created His creation in darkness, then cast upon them some of His light. Whoever was touched by that light was guided, and whoever it missed went astray."

Azami 1036

Sahih

عن عبد الله بن عمرو، قال

سمعت رسول الله ﷺ يقول: إن الله عز وجل خلق خلقه في ظلمة، فألقى عليهم من نوره، فمن أصابه من ذلك النور اهتدى، ومن أخطأه ضل.

الأعظمي 1036صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Belief in the divine decree and predestination
Section
Allah cast His light upon His creation, so whoever it reached was guided, and whoever it missed went astray
Numbering
Jami al-Kamil 1036 (2nd edition)
Azami 1036