Some say... Treat all guns as if they are loaded.
I sometimes say, all guns are loaded, even if they are not.
The first is probably best, but some feel its not authoritative sounding enough.
As far as your recoil spring... Hard to tell. Is is a captured spring or a seperate spring and rod? A captured spring comes out as a unit and does not separate from the rod.
They are usually directional for either type. Most often it is little side to the front.
After you disassemble a firearm and put it back together, do a function check.
Check that the slide moves as it should, ensure that any safety works as it should. Then ensure the trigger and trigger disconnect function properly. The trigger disconnect is what makes the gun fire only one time which each trigger pull, and ensures the action remains cocked and ready to go during the cycling oof the action and the trigger is still rearward.
To test, safely dry fire the pistol, and keep the trigger pulled to the rear. Then cycle the slide, and let the trigger move forward to its rest position, then dry fire again.
You should feel and hear the trigger break, then reset when going forward, then it should break again.
There are videos on how to do this online. There are also videos on properly feild stripping then reassembling the XDm online.
The grouping isn't bad for a beginner. Practice dry firing for several minutes every day until you get to the range again, you will notice an improvement. The overall look of the target suggests you have issues with trigger control, grip, and flinch/anticipation. All added together makes for inconsistent groupings. But the majority seems to be hitting close to center, so its an overcome-able problem.
How to hold a semiauto pistol