By default, blender does not have transparency in GlassBSDF node.
You have to use TransparentBSDF node to give transparent property to your material.
Here is my node setup for Cycles engine…

If you are using EEVEE engine. You have to change Blend Mode in material settings panel to Alpha Hashed or Alpha Blend (Alpha Hash will give some noise in renders. To render without noise, use Alpha Blend, but this would increase render time)
Here is my node setup for EEVEE engine…

Finally, to remove HDRI effects, disconnect any texture nodes connected to Background node in World Shader Node Editor
*To reduce background effects on the object, decrease the strength value.
