Apple added a Volume Limit feature in iOS 18.2, which lets you set the maximum volume for media playing on your iPhone.