If the gun is brand-new-out-of-the-box, and/or you are relatively new to Glocks, then I'd say it's your shooting fundamentals, not the gun. If the gun is used, and has had the sight replaced, then it might be the sights, but for most new Glockers, it's a trigger-control thing.
New Glock shooters often shoot low, or low-left/low-right, because of bad habits they have picked up when shooting other handguns. As you squeeze the Glock's trigger, you will feel steady resistance, and then a slight increase in resistance. Most folks think this is the "end" of the trigger pull, and the gun is about to fire, so they think they can snap/jerk or just "rush" the trigger through last little bit of travel. Unfortunately, when you feel that little extra resistance, there is still more than a little trigger travel left, and if you snap or jerk the trigger, the gun can move a long way off the center of the target before the trigger finally releases the striker, fires the round, and the bullet gets out of the barrel. Please don't take this personally; I don't know you or your shooting style, and I'm not saying I do. All I am saying that this is a VERY common problem with new Glock shooters, and I'm assuming you are having a similar struggle. Thankfully, it's a fairly easy challenge to overcome.
Concentrate on a slow squeeze all the way through the pull until the gun fires. Don't think "fire"; think "add more pressure, more pressure, more pressure, etc." until you hear a loud noise and the gun bounces in recoil. Then look at your target, and there will probably be a hole very near the center. That's the basics; squeeze, get a good hit. Pull/snap/jerk/slap the trigger, get something OTHER than a good hit.
Trigger control is super important in handgun shooting, as the smallest last-minute snap/jerk can move these very light guns quite a bit before the bullet gets out of the barrel. If your shots are scattered on target, with some up near the middle and others trailing down and to one side, that is a classic trigger-control problem shot pattern. Once you get used to squeezing the trigger gently, without moving the gun at the moment of firing, the shot groupings will become more and more consistent; the groups will look more rounded, with the shot holes clustered tightly together. That's a sign of good trigger control.
Another potential problem is squeezing the trigger to one side or another instead of straight back. Make sure you are pressing straight to the rear, not hooking or pushing the trigger off to one side as you squeeze.
Watch the sights all the way through the squeeze, and make small corrections as you squeeze to keep the sights as near to the center as possible. Yes, I know they are moving; they move for all of us. It's the shooter that can ignore the minor movements (resisting the urge to "slap/snap/jerk" the trigger as the sights slide across center) and squeeze through the entire pull, nice and steady, that gets the nice round groups near the center of the target.
Good luck, and let me know how it works out for you!
This is a common problem with newbies and compact frame Glock pistols. The trigger is going to take some getting used to. I suspect you're pulling down hard on the trigger just as the shot, 'breaks'. I, also, suspect that you're not controlling the pistol's backstrap as well as you should. (If you concentrate on pressing the lower part of the backstrap, straight back, into the heel of your hand then it'll be a lot tougher to, 'drop' shots.)
Remember to smoothly, 'press' the trigger straight back and not, 'pull' or, 'squeeze' it instead. Regular practice with A-Zoom snap caps will, also, help.
Learn the Glock trigger and how to hold the pistol.
Too much finger will pull shots low Left. The first joint of the trigger finger will give a consistent trigger pull. There is a post on this Forum about Glock triggers.