For consistent groups- biggest factor for me was consistent trigger press. I tried pinning the trigger and it sucked.
I started doing deliberate full presses and “resetting during recoil”, and me groups got much more consistent.
It also took time for me to get used to it- just spending time at that distance helps.
Everything needs to be the same each shot. Grip pressure, grip, trigger press, reset, sight picture, etc