I’m also a rank amateur when it cones to machining, but I learned a while ago that all of the axis’s that you AREN’T working in get locked down before you hit the “start“ button.
The only axis that should be able to move is the axis in which you are working.
It’s right up there with other universal things like “safety glasses everywhere, all the time” or “never get inline with the cutter rotational plane”, “never touch a running machine around the work interface”, “never reach over a running machine”, “never grab a curl on a running machine”, etc.
Too late to help here, but re-stating it might help the next “newbie” that happens across the thread….