After this, Jesus knowing that all things were now accomplished, that the scripture might be fulfilled, saith, “I thirst.” Now there was set a vessel full of vinegar: and they filled a sponge with vinegar, and put it upon hyssop, and put it to His mouth. When Jesus therefore had received the vinegar, He said, “It is finished” and He bowed His head, and gave up the ghost. – John 19:28-30
It seems to me very wonderful that this “I thirst” should be, as it were, the clearance of it all. He had no sooner said “I thirst,” and sipped the vinegar, than He shouted, “It is finished”; and all was over: the battle was fought and the victory won for ever, and our great Deliverer’s thirst was the sign of His having smitten the last foe. The flood of His grief has passed the high-water mark and began to be assuaged. The “I thirst” was the bearing of the last pang; what if I say it was the expression of the fact that His pangs had at last begun to cease, and their fury had spent itself, and left Him able to note His lesser pains? The excitement of a great struggle makes men forget thirst and faintness; it is only when all is over that they come back to themselves and note the spending of their strength. The great agony of being forsaken by God was over, and He felt faint when the strain was withdrawn. I like to think of our Lord’s saying, “It is finished,” directly after He had exclaimed, “I thirst”; for these two voices come so naturally together. Our glorious Samson had been fighting our foes; heaps upon heaps He had slain His thousands, and now like Samson He was sore athirst. He sipped of the vinegar, and He was refreshed, and no sooner has He thrown off the thirst than He shouted like a conqueror, “It is finished,” and quitted the field, covered with renown. Let us exult as we see our Substitute going through with His work even to the bitter end, and then with a “Consummatum est” returning to His Father, God. O souls, burdened with sin, rest ye here, and in resting, live. ~ C.H. Spurgeon
https://www.blueletterbible.org/comm/spurgeon_charles/sermons/1409.cfm