There is no automatic silence when locked, but there are several settings that can silence the phone.
- The most obvious: The Mute switch on the left side of the phone above the volume buttons
- The volume buttons themselves; they control the volume of the current app; on the Home screen, the ring sound; when on a phone call, the listening volume, in a streaming app or a game, the sound level of the content - The phone remembers the settings for each separately
- Do not Disturb: If it is enabled there is a setting to silence the phone all the time, or only when locked. But this setting is ignored if Do not Disturb is turned off, and the phone will make sounds whether locked or unlocked
- If are wearing an Apple Watch and wrist detection is enabled on it some notification sounds will come from the watch only, unless the phone is unlocked.