Hi there rachelle183,
We see you need help with Apple Music pausing. You mention using wired headphones with your iPhone and that it seems to happen when your iPhone moves.
One way to narrow down where the underlying issue is. We'd suggest testing your earphones with another device and also confirming if the issue is just with Apple Music. There is a good chance the issue is something within the wire of the headphones. Moving it around might show you that's when the skipping issue occurs, it might be a short in the wire.
If they are Apple EarPods, you can also look at cleaning them to help: How to clean your Apple products
For testing your iPhone, play Apple Music while on speaker and move your iPhone around. If it plays without issue, it definitely isn't your iPhone.
Reply back with any questions.
Take care.