First, the gift and reception of the Holy Spirit is also symbolized by fire. Matt 3:11, Luke 3:16, Acts 2:3, 4, 7:30, Rom 12:11, 1 Thess 5:19, Rev 4:5, 7, 8:5, 14:10, 18, 15:2, 19:20, 20:9, 10, etc.
Note the comments from HELPS Word-studies at https://biblehub.com/greek/4442.htm
God's Spirit, like a holy fire, enlightens and purifies so that
believers can share more and more in His likeness. Indeed the fire of
God brings the uninterrupted privilege of being transformed which
happens by experiencing faith from Him. Our lives can become true
offerings to Him as we obey this imparted faith from God by His power.
[This is illustrated by God's fire burning continuously at the
entrance of the Tabernacle where the priests made sweet-savor
offerings. Compare Lev 6:12,13 with 1 Pet 2:5,9.]
Now note the text of Matt 3:
10 The axe lies ready at the root of the trees, and every tree that does not produce good fruit will be cut down and thrown into the
fire.
11 I baptize you with water for repentance, but after me will come One more powerful than I, whose sandals I am not worthy to carry. He
will baptize you with the Holy Spirit and with fire.
12 His winnowing fork is in His hand to clear His threshing floor and to gather His wheat into the barn; but He will burn up the chaff
with unquenchable fire.”
Note the construction of this: Judgement by fire - Holy Spirit symbolized by fire - Judgement by Fire
That is, the word fire is being used in two senses - as a symbol of the presence of the Holy Spirit in the life and as a symbol of Judgement.
Ellicott offers these comments about V11:
He shall baptize you with the Holy Ghost, and with fire.—As heard and understood at the time, the baptism with the Holy Ghost would
imply that the souls thus baptised would be plunged, as it were, in
that creative and informing Spirit which was the source of life and
holiness and wisdom. The baptism “with fire” would convey, in its
turn, the thought of a power at once destroying evil and purifying
good; not, in any case, without the suffering that attends the contact
of the sinner’s soul with the “consuming fire” of the holiness of God,
yet for those who had received the earlier baptism, and what it was
meant to convey, consuming only what was evil, and leaving that which
was precious brighter than before. The appearance of the “tongues like
as of fire” that accompanied the gift of the Spirit on the day of
Pentecost was an outward visible sign, an extension of the symbolism,
rather than the actual fulfilment of the promise.
Thus, V10-12 appears to be saying something like this -"You have a choice - either the fire of the Holy Spirit in the life now, or, the fire of judgement - make your choice well!"