Verses 20 through 22 describe Job's reaction to his trials.
Job rose up, tore his clothes, shaved his head, fell to the earth, and worshipped God (v. 20).
Job said, "Naked I came out of my mother's womb,/And naked I will return there" (v. 21a). Then he went on to declare, "Jehovah gives and Jehovah takes away;/Blessed be the name of Jehovah" (v. 21b).
In all this Job did not sin, nor did he charge God with unseemliness (v. 22).
Later, Job's three friends heard about his situation and came to visit him (2:11-13). Job, his wife, and his friends all were perplexed and unable to find out the reason for what had befallen Job. They could not find the answer because the Old Testament alone does not have the answer. The answer is in Paul's Epistles.