Shoot four days a week. At least a hundred rounds each session.
Practice makes perfect.
Something I did not long after I got my Glock was to stop shooting from twenty-five to thirty yards away. I was new (still am) to handgunning, but I reasoned that as a kid, I learned to shoot up close, then graduated farther and farther back. Applying this line of reasoning to the Glock, I'd warm up at five yards with the pistol, then move back to ten. When I was secure at ten yards, then I moved back to fifteen, etc., etc. Now I'm far more accurate and confident at twenty-five to thirty yards after nine months of shooting.
It worked for me, but do what works best for you.