Allah is The All-Knowing
مَآ أَصَابَ مِن مُّصِيبَةٍ إِلَّا بِإِذْنِ ٱللَّهِ ۗ وَمَن يُؤْمِنۢ بِٱللَّهِ يَهْدِ قَلْبَهُۥ ۚ وَٱللَّهُ بِكُلِّ شَىْءٍ عَلِيمٌۭ
No calamity befalls ˹anyone˺ except by Allah’s Will. And whoever has faith in Allah, He will ˹rightly˺ guide their hearts ˹through adversity˺. And Allah has ˹perfect˺ knowledge of all things. [64:11]
No matter what you're going through, it is all happening by the Qadr of Allah. The concept that, no matter what, Allah knows everything and has already decided everything that will happen. And as it says in the ayat above, if you have faith in Allah, if you trust Allah, He will guide you through that adversity you're going through. SubhanAllah. He really is Al-Aleem, the All-Knowing.