...
The motor must be constrained in all 3 axis of movement inside the rocket. Usually, this is accomplished with a tube that stops the motor from moving side-to-side in the rocket, a thrust plate that stops the motor from moving up, and a retainer that stops the motor from moving down.