Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:57:22

No disaster strikes upon the earth or among yourselves except that it is in a register before We bring it into being - indeed that, for Allah, is easy -  

No affliction befalls in the earth, by way of drought ˹for example˺, or in yourselves, such as illness, or the loss of a child, but it is in a Book, meaning, the Preserved Tablet (al-lawh al-mahfūz), before We bring it about, ˹before˺ We create it — the same is said ˹to be true˺ of ˹God’s˺ graces — that is indeed easy for God,
القرآن:٥٧:٢٢

مَا أَصَابَ مِنْ مُصِيبَةٍ فِي الْأَرْضِ وَلَا فِي أَنْفُسِكُمْ إِلَّا فِي كِتَابٍ مِنْ قَبْلِ أَنْ نَبْرَأَهَا ۚ إِنَّ ذَٰلِكَ عَلَى اللَّهِ يَسِيرٌ  

{ما أصاب من مصيبة في الأرض} بالجدب {ولا في أنفسكم} كالمرض وفقد الولد {إلا في كتاب} يعنى اللوح المحفوظ {من قبل أن نبرأها} نخلقها، ويقال في النعمة كذلك {إن ذلك على الله يسير}.

See similar narrations below:

Collected by Ḥākim, Bayhaqī
hakim:3788al-Ḥasan b. Yaʿqūb al-ʿAdl > Yaḥyá b. Abū Ṭālib > ʿAbd al-Wahhāb b. ʿAṭāʾ > Saʿīd b. Abū ʿArūbah > Qatādah > Abū Ḥassān al-Aʿraj > ʿĀʾishah > Kān

[Machine] The Messenger of Allah ﷺ used to say, "The people of Jahiliyyah (pre-Islamic period of ignorance) used to say that omens are only in women, animals, and houses." Then I recited, "{No disaster strikes upon the earth or among yourselves except that it is in a register before We bring it into being - indeed that, for Allah, is easy}" [Surah Al-Hadid 22].  

الحاكم:٣٧٨٨أَخْبَرَنَا الْحَسَنُ بْنُ يَعْقُوبَ الْعَدْلُ ثنا يَحْيَى بْنُ أَبِي طَالِبٍ أَنْبَأَ عَبْدُ الْوَهَّابِ بْنُ عَطَاءٍ أَنْبَأَ سَعِيدُ بْنُ أَبِي عَرُوبَةَ عَنْ قَتَادَةَ عَنْ أَبِي حَسَّانَ الْأَعْرَجِ أَنَّ عَائِشَةَ قَالَتْ

كَانَ رَسُولُ اللَّهِ ﷺ يَقُولُ كَانَ أَهْلُ الْجَاهِلِيَّةِ يَقُولُونَ إِنَّمَا الطِّيَرَةُ فِي الْمَرْأَةِ وَالدَّابَّةِ وَالدَّارِ ثُمَّ قَرَأَتْ {مَا أَصَابَ مِنْ مُصِيبَةٍ فِي الْأَرْضِ وَلَا فِي أَنْفُسِكُمْ إِلَّا فِي كِتَابٍ مِنْ قَبْلِ أَنْ نَبْرَأَهَا إِنَّ ذَلِكَ عَلَى اللَّهِ يَسِيرٌ} [الحديد 22]  

«هَذَا حَدِيثٌ صَحِيحُ الْإِسْنَادِ وَلَمْ يُخَرِّجَاهُ» صحيح
bayhaqi:16525Abū ʿAbdullāh al-Ḥāfiẓ > al-Ḥasan b. Yaʿqūb al-ʿAdl > Yaḥyá b. Abū Ṭālib > ʿAbd al-Wahhāb b. ʿAṭāʾ > Saʿīd b. Abū ʿArūbah > Qatādah > Abū Ḥassān al-Aʿraj > ʿĀʾishah

[Machine] The Messenger of Allah ﷺ used to say, "The people of Jahiliyyah used to say that omens are only found in women, animals, and houses." Then I recited, "No disaster strikes upon the earth or among yourselves except that it is in a register before We bring it into being - indeed that, for Allah, is easy" [Surah Al-Hadid 22].  

البيهقي:١٦٥٢٥وَأَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ أَنْبَأَ الْحَسَنُ بْنُ يَعْقُوبَ الْعَدْلُ ثَنَا يَحْيَى بْنُ أَبِي طَالِبٍ أَنْبَأَ عَبْدُ الْوَهَّابِ بْنُ عَطَاءٍ أَنْبَأَ سَعِيدُ بْنُ أَبِي عَرُوبَةَ عَنْ قَتَادَةَ عَنْ أَبِي حَسَّانَ الْأَعْرَجِ أَنَّ عَائِشَةَ ؓ قَالَتْ

كَانَ رَسُولُ اللهِ ﷺ يَقُولُ كَانَ أَهْلُ الْجَاهِلِيَّةِ يَقُولُونَ إِنَّمَا الطِّيَرَةُ فِي الْمَرْأَةِ وَالدَّابَّةِ وَالدَّارِ ثُمَّ قَرَأْتُ {مَا أَصَابَ مِنْ مُصِيبَةٍ فِي الْأَرْضِ وَلَا فِي أَنْفُسِكُمْ إِلَّا فِي كِتَابٍ مِنْ قَبْلِ أَنْ نَبْرَأَهَا إِنَّ ذَلِكَ عَلَى اللهِ يَسِيرٌ} [الحديد 22]