First say Bismillah 3 times and after that say 7 times:
أَعُوْذُ بِعِزَّةِ اللَّهِ وَقُدْرَتَهٖ مِنْ شَرِّ مَا أَجِدُ مِنْ وَجَعِي هٰذَا
Pronunciation
A`udhu bi-`izzatillahi wa qudratihi min sharri ma ajidu min waja`i hadhaa.
Meaning
I seek refuge in Allah’s might and power from the evil of this pain I feel.
Source: Sahih. Tirmidhi: 3588
Read the hadith
حَدَّثَنَا عَبْدُ الْوَارِثِ بْنُ عَبْدِ الصَّمَدِ، حَدَّثَنِي أَبِي، حَدَّثَنَا مُحَمَّدُ بْنُ سَالِمٍ، حَدَّثَنَا ثَابِتٌ الْبُنَانِيُّ، قَالَ قَالَ لِي يَا مُحَمَّدُ إِذَا اشْتَكَيْتَ فَضَعْ يَدَكَ حَيْثُ تَشْتَكِي وَقُلْ بِسْمِ اللَّهِ أَعُوذُ بِعِزَّةِ اللَّهِ وَقُدْرَتِهِ مِنْ شَرِّ مَا أَجِدُ مِنْ وَجَعِي هَذَا ثُمَّ ارْفَعْ يَدَكَ ثُمَّ أَعِدْ ذَلِكَ وِتْرًا فَإِنَّ أَنَسَ بْنَ مَالِكٍ حَدَّثَنِي أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم حَدَّثَهُ بِذَلِكَ . قَالَ هَذَا حَدِيثٌ حَسَنٌ غَرِيبٌ مِنْ هَذَا الْوَجْهِ وَمُحَمَّدُ بْنُ سَالِمٍ هَذَا شَيْخٌ بَصْرِيٌّ .
Muhammad bin Sulaim narrated: “Thabit Al-Bunani narrated to me, he said to me: ‘O Muhammad, when you suffer from some ailment, then place your hand at the place of the ailment, then say: “In the Name of Allah, I seek refuge in Allah’s might and power from the evil of this pain I feel (Bismillāh, a`ūdhu bi-`izzatillāhi wa qudratihī min sharri mā ajidu min waja`ī hādhā).” Then lift your hand and repeat that an odd number of times. For indeed, Anas bin Malik narrated to me, that the Messenger of Allah (ﷺ) narrated that to him.’” [Sahih (Albani). Tirmidhi: 3588]
Duas from IslamicAPI's Masnun Dua dataset (based on the Quran, hadith, Hisnul Muslim and Rahe Belayat). See the dataset