When the Bible says to not grieve the Holy Spirit (Eph 4:30), I don’t think it means that we do things that hurt the Holy Spirit’s feelings. I think that God is bigger than that. I think His capacity to love is so vast, that we can’t do anything to actually hurt Him.
What I think happens is that He sees us doing things that are harmful to ourselves. Just like you would feel terrible about watching someone drink poison. You would try to stop them and feel badly when they suffered from it. He only wants to protect us, but we have to let Him.
We grieve Him when we fail to listen to Him, because He is trying to protect us and make us safe and free. When we continue in bad habits and attitudes, we actually work against Him. But He is kind and patient. He will wait until we get the message and see what He was right all the time.
But nothing, nothing, nothing that we do can make God stop loving us. Even the worst human being is loved completely by God. We may frustrate His effort, but He will never stop loving us. And when we realize that we have sinned, He forgives and forgets. He is amazing.