Affliction is good
“I thought on my ways, And turned my feet unto thy testimonies. I made haste, and delayed not To keep thy commandments. The bands of the wicked have robbed me: But I have not forgotten thy law. At midnight I will rise to give thanks unto thee Because of thy righteous judgments. It is good for me that I have been afflicted; That I might learn thy statutes. The law of thy mouth is better unto me Than thousands of gold and silver.”
Psalm 119:59-62, 71-72 KJV
https://bible.com/bible/1/psa.119.59-62.KJV
(20) Then Job arose, and rent his mantle, and shaved his head, and fell down upon the ground, and worshipped,(21) And said, Naked came I out of my mother's womb, and naked shall I return thither: the LORD gave, and the LORD hath taken away; blessed be the name of the LORD. (22) In all this Job sinned not, nor charged God foolishly.