Baptist John Baptises them with Water as the forerunner of the Messiah
John 1:24–28 (NIVUK):
24 Now the Pharisees who had been sent 25 questioned him, ‘Why then do you baptise if you are not the Messiah, nor Elijah, nor the Prophet?’
26 ‘I baptise with water,’ John replied, ‘but among you stands one you do not know. 27 He is the one who comes after me, the straps of whose sandals I am not worthy to untie.’
28 This all happened at Bethany on the other side of the Jordan, where John was baptising.
After priests and Levites got the answer from Baptist John (19-23), the Pharisees (24) asked a further question. See v25.
‘Why then do you baptise if you are not the Messiah, nor Elijah, nor the Prophet?’
Passages such as Ezekiel 36:25 and Ezekiel 37:23 let the Jews expect a cleansing of the people [1]. Baptism is related to the cleansing and this cleansing would be a role of Messiah (=the Prophet) or his forerunner (e.g., Elijah). This question arose when Baptist John denied his being any of them. What is Baptist John’s answer? See v26-27.
26 ‘I baptise with water,’ John replied, ‘but among you stands one you do not know. 27 He is the one who comes after me, the straps of whose sandals I am not worthy to untie.’
Baptist John’s answer indicates that the Messiah (27b) is already among them (26) and Baptist John is his forerunner (27a). Baptist John gives water baptism as the forerunner of the Messiah. This answers their question. The Messiah baptises them with the Holy Spirit and fire (John 1:33, Matthew 3:11, Luke 3:16).
References
[1] Lenski, R.C.H., The Interpretation of St. John’s Gospel