How could God allow Jesus to be treated so badly and beaten and not do anything?

Question
How could God allow Jesus to be treated so badly and beaten and not do anything?
I lost my son in 2020. The pain of that will always be there. I could never have allowed my only son to die for our sins.
Response
Jesus suffered severely throughout His trials, torture, and crucifixion (Matthew 27; Mark 15; Luke 23; John 19). His suffering was physical: Isaiah 52:14 declares, “There were many who were appalled at Him—His appearance was so disfigured beyond that of any man and his form marred beyond human likeness.” His suffering was emotional: “All the disciples deserted him and fled” (Matthew 26:56). His suffering was spiritual: “God made him who had no sin to be sin for us” (2nd Corinthians 5:21). Jesus had the weight of the sins of the entire world on Him (1st John 2:2). It was our sin that caused Jesus to cry out, “My God, my God, why have you forsaken me?” (Matthew 27:46). Jesus’ brutal physical suffering was augmented by His having to bear the guilt of our sins and die to pay our penalty (Romans 5:8).
Isaiah predicted Jesus’ suffering: “He was despised and rejected by men, a man of sorrows, and familiar with suffering. Like one from whom men hide their faces he was despised, and we esteemed him not. But he was pierced for our transgressions, He was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed” (Isaiah 53:3, 5). This passage specifies the reason for Jesus’ suffering: “for our transgressions,” for our healing, and to bring us peace.
Jesus told His disciples that His suffering was certain: “The Son of Man must suffer many things and be rejected by the elders, the chief priests and the teachers of the law, and he must be killed and on the third day be raised to life” (Luke 9:22; 17:25). Note the word must - - He must suffer, and He must be killed. The suffering of Christ was God’s plan for the salvation of the world.
Psalm 22:14–18 details some of the suffering of the Messiah: “I am poured out like water, and all my bones are out of joint. My heart has turned to wax; it has melted away within me. My strength is dried up like a potsherd, and my tongue sticks to the roof of my mouth; you lay me in the dust of death. Dogs have surrounded me; a band of evil men has encircled me, they have pierced my hands and my feet. I can count all my bones; people stare and gloat over me. They divide my garments among them and cast lots for my clothing.” For this and other prophecies to be fulfilled, Jesus had to suffer.
Why did Jesus have to suffer so badly? The principle of the innocent dying for the guilty was established in the garden of Eden: Adam and Eve received garments of animal skin to cover their shame (Genesis 3:21) - - thus, blood was shed in Eden. Later, this principle was set in the Mosaic Law: “It is the blood that makes atonement for one’s life” (Leviticus 17:11; Hebrews 9:22). Jesus had to suffer because suffering is part of sacrifice, and Jesus was “the Lamb of God, who takes away the sin of the world!” (John 1:29). Jesus’ physical torture was part of the payment required for our sins. We are redeemed “with the precious blood of Christ, a lamb without blemish or defect” (1st Peter 1:19).
Jesus’ suffering on the cross showed the devastating nature of sin, the wrath of God, the cruelty of humanity, and the hatred of Satan. At Calvary, mankind was allowed to do his worst to the Son of Man as He became the Redeemer of mankind. Satan may have thought he had won a great victory, but it was through the cross that the Son of God triumphed over Satan, sin, and death. “Now is the time for judgment on this world; now the prince of this world will be driven out” (John 12:31; Colossians 2:15).
Jesus suffered and died to secure salvation for all who would believe. The night of His arrest, as Jesus prayed in Gethsemane, He committed His all to the task: “Father, if you are willing, take this cup from me; yet not my will, but yours be done” (Luke 22:42). The cup of suffering was not taken from Christ; He drank it all for us. There was no other way for us to be saved.
An even more intimate purpose of His suffering was His ministry to us as High Priest. The Messiah was promised to be an eternal priest (Ps. 110). God in His infinite wisdom and love (Rom. 5:6-11) perfected this priesthood by His suffering (Heb. 5:7)
Therefore, in all things He had to be made like His brethren, that He might be a merciful and faithful High Priest in things pertaining to God, to make propitiation for the sins of the people. For in that He Himself has suffered, being tempted, He is able to aid those who are tempted. Heb. 2:17-18
As our Mediator (1 Tim. 2:5-6) and Advocate (1 John 2:1-2), before the Father, He understands the depths of human suffering.
He knows rejection like no other (Is. 53:3). He understands being ridiculed by family (John 7:1-5), by community (Luke 4:24) and by an entire nation (John 1: 11-13). He understands betrayal by a close friend (Matt. 26:48-50). He understands being abandoned by friends (Matt. 26:56). He understands being falsely accused (Matt. 26: 59-61)
Literally from head (Crown of Thorns) to toe (Spikes in feet), Jesus knows the depth of physical pain. The torture He experienced(Matt 27:6-31) was done by the worst agency of human cruelty ever , the Romans (Dan. 7:7,23) and was open season for all principalities and powers (Ps. 22: 12,13,16;1 Cor. 2:8). This would explain why He was no longer recognizable as a man (Is. 52:14). Again, from Psalm 22, In His crucifixion He not only experienced the piercing of His hands and feet (v.16), He experienced heart failure (v.14), severe dehydration (v.15), joint dislocation (v.14), and asphyxiation—the inability to exhale due to the body’s stretched weight on the chest muscles.
In becoming sin for us (2 Cor. 5:21), He experienced the bondage, shame and even the deserved condemnation that sin brings upon us.
So whether broken by lost, scarred by rejection, living in Excruciating pain, or shamed by addiction. He understands. He not only hears our cries (Ps.34:4) He understands our cries.
For we do not have a High Priest who cannot sympathize with our weaknesses, but was in all points tempted as we are, yet without sin. Let us therefore come boldly to the throne of grace, that we may obtain mercy and find grace to help in time of need. Hebrews 4:15-16
Because of His suffering, we can, confidently declare:
What then shall we say to these things? If God is for us, who can be against us? 32 He who did not spare His own Son, but delivered Him up for us all, how shall He not with Him also freely give us all things? Romans 8:31-32