By default, the volume buttons on the side change the “system volume”, which affects things like music and video playback. But the volume of your ringer volume, which controls the ringer and notifications, stays the same unless you change it from the settings.
If you want your volume buttons to control system volume and ringer volume, you can make them do so by tweaking one setting. 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.