Open your iPhone's Settings app and tap on Sounds and Haptics. Under Ringers and Alerts, toggle the switch that says Change With Buttons. Now when you press the volume buttons, it will also change the volume of the ringer.