Start with this Du'a
On seeing someone in hardship
الْحَمْدُ لِلَّهِ الَّذِي عَافَانِي مِمَّا ابْتَلاَكَ بِهِ، وَفَضَّلَنِي عَلَى كَثِيرٍ مِمَّنْ خَلَقَ تَفْضِيلاً
Al-hamdu lillahi-lladhi 'afani mimmab-talaka bih, wa faddalani 'ala kathirin mimman khalaqa tafdila.
“All praise is for Allah, who has kept me safe from what He has tested you with, and has favoured me greatly over much of what He created.”
Jami at-Tirmidhi 3432 (hasan per al-Albani; others weaker)
The Prophet ﷺ said that whoever sees someone afflicted and says this will be kept safe from that affliction. Say it quietly, so that the one being tested does not hear. At-Tirmidhi called the narration gharib; al-Albani graded it hasan.