I found this and I am going to try it.
Why does my iPhone volume keep going down?
Attention Aware, Reduce Loud Sounds, and accidental button presses can all cause your iPhone's volume to decrease automatically. To fix this issue, you can disable Attention-Aware features, turn off the ability to change volume with buttons, and disable Reduce Loud Sounds.