I own the following 9mm pistols: Beretta 92FS, S&W 5906 (older 3rd generation, all steel), Glock 17, Glock 19 (three of them).
If I were to pick one of my guns for a person that was planning on using it for HD, not carry, and was not an experienced handgunner, I would pick the Glock 17, no question. Good capacity. Full size service pistol makes recoil very mild.
The Glock is a paragon of reliability and has the simplest manual of arms: pull the trigger. No safety to be manipulated in the heat of the moment. You simply can't beat a Glock's reliability and simplicity.
That said, there are some very good alternatives out there. You owe it to yourself to shoot a few of the ones recommended here.
Last, but not least, learn your new pistol. Really learn it. Learn the manual of arms. If it's got a safety, practice the first shot (presentation, safety off, double action pull, etc.) several hundred times. You can use snap caps/dummy rounds to learn this, but you have to develop the muscle memory to be able to employ it when you're surprised in your home and the adrenaline hits. You should be able to "tap & rack" quickly if you get a FTF. Simply buying the gun and punching holes in paper is not enough. Being able to employ the gun effectively under stress is what makes it a defensive tool.