“Rav Tzadok HaCohen writes in his sefer Dover Tzedek that to believe that Hashem is behind everything that happens in our lives is the… main focus of the Torah.
He continues: ‘All 613 mitzvos are ways for us to reach this ultimate understanding that everything in life comes from Hashem.
Furthermore, when we truly believe that there are no accidents and nothing happens haphazardly, that alone sweetens all the judgments a person faces and can even help rectify all the person’s sins.'”