If you are fortunate, you have lived a life where you have done good and good has happened to you in return.... and you can agree with Job's friends. But, if you are like many of us, you have had a lot of things happen to you that were not good when you were doing your best to please God.
In the first chapter of Job when he had everything taken away, He said this: “Naked I came from my mother’s womb, And naked shall I return there. The gave, and the has taken away;
And the chapter concludes, "In all of this Job did not sin nor charge God with wrong.
Job didn't do anything wrong, nor did he accuse God of wrongdoing. And he recognized what Jesus would later point out in Matthew 5: that the rain falls on the just and the unjust.
If you are feeling like maybe you did something wrong and that is why you are facing hard times, let that go. Recognize that stuff happens.... and that the Lord gives and takes away. And then bless Him, but don't charge Him with wrong.