At this time, I won't/can't advise how to remove this unknown front sight on the OP's Glock. OK, at the risk of giving bad advice, one old method was to merely take some pliers, while protecting the top of the slide, and prying the front sight off, usually destroying the old front sight. This worked ok for sight-type "1", below.
For sight-type "2", I suppose the plier method worked ok, too, but using tweezers, the polymer pin could be pulled out, and the front sight could usually be removed and even reused if desired.
I don't know the years of when Glock used, then changed to various methods of front sight attachment, but as I recall, Glock used three methods over its ~38 years of producing its handguns.
For lack of better terminology, I'll just do my best to describe the three attachment methods, which might overlap in the years of use by Glock. It's always possible an old sight was put on by a person other than a Glock employee during the 18 years of the subject Glock.
1. The 1st method used a flared or "staked" "tenon". Glock used to sell its own tool to its Armorers to flare a tenon outward. I have one or two of these tools floating around my many tool-boxes somewhere. Let's see if I can find a pic of the tool, and someone else can do an internet search to possibly find a pic of one of these oldest-type front sights.
Disregard the orange-colored rear cover plate at the top and the regular Glock punch tool at the bottom.
2. The next method of front sight attachment was a very small polymer pin spreading apart a polymer-4-petal base, which I suppose could also be described as a tenon.
3. Finally, the hex-head screw became the norm and all the aftermarket and replacement sights were already coming with a hex-head screws even before Glock began using these screw-on front sights on new guns coming from the factory.
Post 2 is correct in needing a good front sight hex "nut driver" (even though it's not a nut, but a screw, to install a new front sight. That nut driver has to have a fairly thin socket. A socket which is too thick in diameter just won't be small enough to fit over the screw head yet still clearing the insides of the slide.