The Holy Spirit is grieved/quenched when we willfully disobey:
Yet they rebelled and grieved his Holy Spirit. So he turned and became their enemy and he himself fought against them.
But when he, the Spirit of truth, comes, he will guide you into all the truth. He will not speak on his own; he will speak only what he hears, and he will tell you what is yet to come.
The Holy Spirit is grieved/quenched when we disbelieve and doubt God:
for they did not believe in God or trust in his deliverance.
The Holy Spirit is grieved/quenched by indifference and disregard to the things of God:
Do not get drunk on wine, which leads to debauchery. Instead, be filled with the Spirit, speaking to one another with psalms, hymns, and songs from the Spirit. Sing and make music from your heart to the Lord,
And hope does not put us to shame, because God’s love has been poured out into our hearts through the Holy Spirit, who has been given to us.
Do you not know that your bodies are temples of the Holy Spirit, who is in you, whom you have received from God? You are not your own;
1 Corinthians 6:19
Results of Grieving/quenching the Spirit:
Restore to me the joy of your salvation and grant me a willing spirit, to sustain me.
If we confess our sins, He is faithful and just to forgive us our sins and to cleanse us from all unrighteousness.
1 John 1:9