The Lord gave, and the Lord has taken away; Blessed be the name of the Lord.” In all this Job did not sin nor charge God with wrong. Job 1:21, 22
Chapters 1, 2. Prologue: Satan’s Test
God allows Job to suffer calamities at Satan’s hands
Job is a man of wealth and piety. In God’s own worlds, Job is “blameless and upright: a man who fears God and shuns evil” (1:8).
1 There was a man in the land of Uz, whose name was Job; and that man was blameless and upright, and one who feared God and shunned evil.
5 So it was, when the days of feasting had run their course, that Job would send and sanctify them, and he would rise early in the morning and offer burnt offerings according to the number of them all. For Job said, “It may be that my sons have sinned and cursed  God in their hearts.” Thus Job did regularly.
8 Then the Lord said to Satan, “Have you considered My servant Job, that there is none like him on the earth, a blameless and upright man, one who fears God and shuns evil?”
But the main characters in these two chapters are the Lord and Satan. The two enter into a contest, with Job as the battleground. Satan insists he will move Job to “curse [God] to your face” if only the Lord removes the protection he maintains around Job. The Lord does so, and permits Satan to test Job. In a series of disasters whose timing and nature label them as supernatural, Job’s wealth is stripped away, his children killed, and his body is covered with agonizing boils.
12 And the Lord said to Satan, “Behold, all that he has is in your power; only do not lay a hand on his person.” So Satan went out from the presence of the Lord.
In spite of his suffering, Job does not curse God. The test ends at 2:10 with this summary; “in all this, Job did not sin in what he said.” Satan failed to accomplish what he said he would achieve.
The first chapter refers to angels as “sons of God.” This is a common OT phrase, indicating direct creation or causation by God. The fact that all angels good and evil were required to present themselves at God’s command shows that even those who have rebelled against God cannot deny His ultimate authority.
20 Then Job arose, tore his robe, and shaved his head; and he fell to the ground and worshiped. 21 And he said: “Naked I came from my mother’s womb, And naked shall I return there. The Lord gave, and the Lord has taken away; Blessed be the name of the Lord.” 22 In all this Job did not sin nor charge God with wrong.