Abu Hurairah reported,

The Messenger of Allah ﷺ said, "Satan comes to one of you and asks, 'Who created such and such? Who created such and such?' until he says, 'Who created your Lord?' When it reaches that point, let him seek refuge in Allah and stop."In another narration, "Let him say, 'I believe in Allah and His Messenger.'"

Azami 11301

Sahih

عن أبي هريرة قال

قال رسول الله ﷺ: يأتي الشيطان أحدكم فيقول: من خلق كذا؟ من خلق كذا؟ حتى يقول: من خلق ربك؟ فإذا بلغه فليستعذ بالله ولينته. وفي رواية: فليقل: آمنت بالله ورسوله.

الأعظمي 11301صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Supplications for various occasions
Section
What one should say when Satan whispers to him about the foundations of faith
Numbering
Jami al-Kamil 11301 (2nd edition)
Azami 11301