When such whispers come, seek refuge in Allah and stop there, and say: “I believe in Allah and His messengers.” Then say:
اللَّهُ أَحَدٌ، اللَّهُ الصَّمَدُ، لَمْ يَلِدْ وَلَمْ يُولَدْ، وَلَمْ يَكُنْ لَهُ كُفُوًا أَحَدٌ
Allahu ahad, Allahus-samad, lam yalid walam yulad, walam yakun lahu kufuwan ahad
Allah is One. Allah is the Self-Sufficient, on whom all depend. He neither begets nor was He begotten, and there is none comparable to Him.
Then spit lightly to your left three times and seek refuge in Allah from Satan.
Source Sunan Abī Dāwūd 4722 Ḥasan · Ṣaḥīḥ al-Bukhārī 3276 Ṣaḥīḥ · Ṣaḥīḥ Muslim, The Book of Faith — site no. 251 Ṣaḥīḥ · Qur'an 112:1-4
Compiler cites al-Bukhārī with Fatḥ al-Bārī 6/336; Muslim 1/120 (cited twice); Sunan Abī Dāwūd no. 4722 — see Ṣaḥīḥ at-Targhīb wa't-Tarhīb 2/123
آمَنْتُ بِاللَّهِ وَرُسُلِهِ
Amantu billahi warusulih
I believe in Allah and His messengers.
The Prophet ﷺ taught this for one to whom Satan whispers doubts such as: "Who created Allah?"
Source Ṣaḥīḥ Muslim, The Book of Faith — site no. 251 (similar wording) Ṣaḥīḥ · Ṣaḥīḥ Muslim, The Book of Faith — site no. 250 Ṣaḥīḥ
Compiler cites Muslim 1/119–120
هُوَ ٱلْأَوَّلُ وَٱلْءَاخِرُ وَٱلظَّٰهِرُ وَٱلْبَاطِنُ وَهُوَ بِكُلِّ شَىْءٍ عَلِيمٌ ﴿٣﴾
Huwal-awwalu wal-akhiru waz-zahiru wal-batinu wahuwa bikulli shay'in 'alim (3)
He is the First and the Last, the Manifest and the Hidden, and He has full knowledge of all things. (57:3)
Source Sunan Abī Dāwūd 5110 Ḥasan · Qur'an 57:3 · Qur'an 57:3
Compiler cites Qur'an, al-Ḥadīd 57:3; Abū Dāwūd 4/329; see al-Albānī, Ṣaḥīḥ Abī Dāwūd 3/962 (ḥasan)