This is a beautiful reminder from the Quran. Everything that strikes you is not bad. Any bad incident that has happened in life has come from Allah. Also, any good that happens is from Allah (swt). Whoever has faith in Allah, Allah will guide his heart.
Sometimes we are hit with a situation and we do not know what to do. Do we stay or leave? When we are stuck in a calamity, we should remember Allah. We restore our faith in Allah (swt).
Allah tells us when we are stuck in hard situations think about restoring our faith in Allah, turn towards him. Allah tells us he will guide their heart. It means that Allah will guide us on which actions to take and what actions not to take. We take counsel from parents, loved ones or friends but Allah is the one who will guide us towards what is right.