“Rabbi,” his disciples asked him, “why was this man born blind? Was it because of his own sins or his parents’ sins?” “It was not because of his sins or his parents’ sins,” Jesus answered. “This happened so the power of God could be seen in him.”
Learn to trust in the Lord and in doing so learn to not depend on your own understanding, but rather be completely dependent on Him.
There are many things that can happen in our lives that not as a result of anything that we ourselves have done but simply so that the power and glory of can can be seen. Do not lose hope when things do not work out as you would like them to in a specific moment. Know the God is all powerful and able in all ways. He can use anything to glorify Himself. Do not think that the unpleasant things that happen in your life are a result of your wrong doing. The Lord at times allow certain things to happen so the His glory can be seen. So no matter what is going on in your life, no matter how unpredictable and unfavorable life may seem at the moment, be confident that Jesus is Lord and He can use the most unpleasant things to honor and elevate you. Do not give up on the Lord rather be confident in His Lordship over your life.
Remember people do not always suffer as a way of punishment, but sometimes it can just be as a way of God glorifying Himself. Rather than letting the sufferings in life cause you to lose hope let it instead build your faith in Him.