Dua when something you dislike happens 2:
قَدَّرَ اللَّهُ وَمَا شَاءَ فَعَلَ
It is the decree of Allah and what He wills He does
Qaddarallahu, wa ma sha’a fa’al
Reference : Sunan Ibn Majah 4168
It was narrated that Abu Hurairah said, attributing it to the Prophet (ﷺ):
“The stronger believer is better and more beloved to Allah than the weak believer, although both are good. Strive to seek that which will benefit you and do not feel helpless. If something overwhelms you, then say: Qaddarallah, wa ma sha’a fa’al (It is the decree of Allah and what He wills He does). And beware of (saying) ‘If only,’ for ‘If only’ opens the door to Satan.”
حَدَّثَنَا مُحَمَّدُ بْنُ الصَّبَّاحِ، أَنْبَأَنَا سُفْيَانُ بْنُ عُيَيْنَةَ، عَنِ ابْنِ عَجْلاَنَ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، يَبْلُغُ بِهِ النَّبِيَّ ـ صلى الله عليه وسلم ـ قَالَ “ الْمُؤْمِنُ الْقَوِيُّ خَيْرٌ وَأَحَبُّ إِلَى اللَّهِ مِنَ الْمُؤْمِنِ الضَّعِيفِ وَفِي كُلٍّ خَيْرٌ احْرِصْ عَلَى مَا يَنْفَعُكَ وَلاَ تَعْجِزْ فَإِنْ غَلَبَكَ أَمْرٌ فَقُلْ قَدَّرَ اللَّهُ وَمَا شَاءَ فَعَلَ وَإِيَّاكَ وَاللَّوْ فَإِنَّ اللَّوْ تَفْتَحُ عَمَلَ الشَّيْطَانِ ” .
Grade: Sahih (Darussalam)