What could have gone wrong ? was it all me messing up on the second group ?
It's you!
or, its not.
The way to find out is shoot the rifle again. Shoot it with some ammo of known performance (need not be match ammo) AND have someone else shoot it, as well.
If someone else shoots it well, then, its you.
If ammo of a known standard (like a factory load) doesn't group well, then its the rifle. OR its the rifle sights....
Put a different scope on it, or shoot it with iron sights and see if there is any change. A scoped rifle, shooting 2" group for 10 shots, then shooting a 6" for the next 10, is most often a sight issue. Loose (mounts) or broken inside (reticle shifting).
Right now, leaving you out of the equation, I would look first at loose scope mounts, or failure of the scope itself. IF the mounts are properly tight, and a different scope cures the problem, you need to call Leupold.