Translation for 4:79

مَّآ أَصَابَكَ مِنۡ حَسَنَةٖ فَمِنَ ٱللَّهِۖ وَمَآ أَصَابَكَ مِن سَيِّئَةٖ فَمِن نَّفۡسِكَۚ وَأَرۡسَلۡنَٰكَ لِلنَّاسِ رَسُولٗاۚ وَكَفَىٰ بِٱللَّهِ شَهِيدٗا ٧٩
Whatever good befalls you is from Allah and whatever evil befalls you is from yourself.1 We have sent you ˹O Prophet˺ as a messenger to ˹all˺ people. And Allah is sufficient as a Witness.

Foot notes

76572

 Both good and evil are destined by Allah. The good comes as Allah’s reward for good deeds, whereas the bad comes as Allah’s punishment for evil deeds. In some cases, bad things happen to good people to test their faith, or as an atonement for their sins, or as part of a process of replacing something with what is better (e.g., a job or a spouse).