كتاب الإيمان
1  
The Book of Faith
(60)
Chapter: Clarifying the Waswasah (Whispers, Bad Thoughts) with regard to faith, and what the one who experiences that should say
(60)
باب بَيَانِ الْوَسْوَسَةِ فِي الإِيمَانِ وَمَا يَقُولُهُ مَنْ وَجَدَهَا ‏‏
Sahih Muslim 134 a

It is narrated on the authority of Abu Huraira that the Messenger of Allah (ﷺ) said:

Men will continue to question one another till this is propounded: Allah created all things but who created Allah? He who found himself confronted with such a situation should say: I affirm my faith in Allah.
حَدَّثَنَا هَارُونُ بْنُ مَعْرُوفٍ، وَمُحَمَّدُ بْنُ عَبَّادٍ، - وَاللَّفْظُ لِهَارُونَ - قَالاَ حَدَّثَنَا سُفْيَانُ، عَنْ هِشَامٍ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ لاَ يَزَالُ النَّاسُ يَتَسَاءَلُونَ حَتَّى يُقَالَ هَذَا خَلَقَ اللَّهُ الْخَلْقَ فَمَنْ خَلَقَ اللَّهَ فَمَنْ وَجَدَ مِنْ ذَلِكَ شَيْئًا فَلْيَقُلْ آمَنْتُ بِاللَّهِ ‏"‏ ‏.‏
Reference : Sahih Muslim 134a
In-book reference : Book 1, Hadith 250
USC-MSA web (English) reference : Book 1, Hadith 242
  (deprecated numbering scheme)