Pride acts as a barrier between God and man. Prideful individuals shield themselves from being corrected, from being instructed, and from being rebuked. When we are prideful, we fail to see how sinful we are and how righteous and holy God is. Instead, we live in rebellion to God and His ways.
Jason Dohm explains that there is grace for those who humble themselves. One way to humble ourselves is to fear God. When we fear God, we humble ourselves before him, acknowledging that He is great, we are not. He is the potter, we are the clay. Conversely, if we resist God and rebel against Him, we can expect to be opposed and judged by God.
James 4:6 (NKJV) – “God resists the proud, but gives grace to the humble.”
Psalm 103 11 says that God has great mercy towards those who fear Him. And I think this is something that's related to a thing that we see in 1 Peter, which is that God resists the proud, but He gives grace to the humble. When you fear God, you're humble before Him. You're acknowledging that He's great and you're not. And God gives grace.
God gives grace to the humble, but He resists the proud. God is very merciful to those who fear Him, and yet to those who straighten up their spine to resist Him and live in open rebellion to Him, He resists that. He crushes that.