Acts 7:51-53; NKJV
51 "You stiff-necked and uncircumcised in heart and ears! You always resist the Holy Spirit; as your fathers did, so do you.
52 Which of the prophets did your fathers not persecute? And they killed those who foretold the coming of the Just One, of whom you now have become the betrayers and murderers,
53 who have received the law by the direction of angels and have not kept it."
We resist the Holy Spirit when we resist the word of the prophets, the law, and angels that the Holy Spirit gave them to speak. We resist the Holy Spirit when we resist the word of the Apostles that the Holy Spirit gave them to speak. We resist the Holy Spirit when we resist the word of God which is "the sword of the Spirit" (Ephesians 6:17).
Don't resist the Holy Spirit. Listen to His word. Obey Him.