people say that God stopped punishing our earthly lives because of the sacrifice of Jesus Christ.
Jesus on the cross took the punishment for our sins. But there can be consequences which come because of how we now sin. They might not be meant only as punishment, though, but as measures to manage us to get real correction. But while we are in a selfish way, we can see the measures as being a punishment, but later we may realize it helped to stop us from going the wrong way even into much worse trouble and loss.
"God resists the proud," we have in James 4:6 and also in 1 Peter 5:5. Resisting is not necessarily punishment but God arranging for you in your ego to have interference so you don't keep going the wrong way which could get you and others into much worse pain and trouble and loss.
God wants your attention to be with Him instead of pushing for what you want and demand and dictate.
So, when we get into nasty reacting and irritable and complaining, it can be that God has arranged for things to mess with what we are doing > because He is not pleased with what we are doing, or He is not pleased with how we are doing something that He does want. And so, when we start to get negative, this should be a warning sign that we need to stop what we are doing, right away, and trust God to restore us and correct us and have us sensitively sharing with Him in His peace and obeying what He has us do with Him in His peace.
But I read verses that say that He uses discipline. can you tell me examples of discipline?
First, I would like to offer how Hebrews 12:4-11 says our Heavenly Father disciplines all of us who are His children. It is not only punishment, but changing us to share with God in His own holiness and so we have His love's "peaceable fruit of righteousness" in our character. Punishing can not do this.