This is the truth both in the physical and spiritual realm that suffering comes as the result of ignoring or disobeying a basic law, Gal 6:7 “whatsoever a man soweth that shall he also reap” if you break the law of health you’ll get sick. If you break the law of the land if caught you’ll get punished.
The same thing with the moral law the punishment is certain. Gal 6:8 “for he that soweth to his flesh shall of the flesh reap corruption, but he that soweth of the spirit shall the spirit reap everlasting Life” what a man admits to his life good or bad shall also receive a reward.
Some suffering is as the result of an accident or natural disaster in John 9:2,3 when christ and his disciples pass by along the way they saw a blind man and they ask who did sin, this man or his parent that he was born blind?” Jesus answer neither hath this man sinned or his parent” something must to happen that we understand the real nature of humanity.
Some suffering occurs as the result of Evil men who are on higher authority David outline it in psalm 73:5-12 this is the wicked people who prosper on earth whose heart is deceitful oppressing other men to earn their wealth this is on the political system and other chapters of the society whose consequence is certain.
Some suffering is a result of ignoring the law of God and God permits it to happen so that we may acknowledge God as the Lawgiver and He chastises us in order to bring us to himself as He uses David to set an example for the sin of adultery and murder he committed so that we may learn from that act.
Some suffering is to fulfill the prophecy of Jesus Christ in John 15:20 “Christ said that if they persecute me they will also persecute you” so we are in the sinful world so we should not expect good every time because evil men are still breathing to Life but protection from God is the best thing we should pray for in Jesus Name Amen.