Good day to you kimia245,
To clarify, are you attempting to adjust that sound under these circumstances? - Charge your AirPods and learn about battery life
Turn off charging case sounds
The MagSafe Charging Case for AirPods Pro (2nd generation) plays a sound when it begins to charge, or when the battery charge is low. You can turn off this sound:
1. With your AirPods in your ears and connected to your iPhone, iPad, or iPod touch, go to Settings.
2. Tap the name of your AirPods.
3. Turn off Enable Charging Case Sounds.
Also, be sure your iPhone is up to date and that the firmware for your AirPods are up to date.
Update your iPhone or iPad
About firmware updates for AirPods
Thanks.