Welcome to the community asemkak! Such a blessing to have you here with us. The Lord our God is just and merciful. He gave us His only Beloved Son as proof of this undying Love. He created us and He knows what we are or what we were to become yet He still loves us despite all our faults...despite all our beautiful mistakes He still takes us back.
Perhaps it would make our life a lot more bearable if we were to learn from our mistakes, but some of us are creatures of habit so this might be a bit difficult.
The Lord does not choose freely to punish us because we made a mistake. Rather i would like to look at is as a chance for us to realize our wrong doing and ask for forgiveness.
So yes it would be much easier to learn from our mistakes.
What we might see as a punishment might be the Lord way of reaching out to us so generally i don't believe the Lord wants to punish us for our mistakes.
Believe, trust, pray, meditate, and BE BLESSED.
“Take delight in the LORD, and he will give you the desires of your heart.” Psalm 37:4