Swiping to control the volume only works on AirPods Pro 2. Earlier models will need to use Siri to adjust the volume. If you are using AirPods Pro 2 and the swipe gesture is not working to make your AirPods louder, then there may be an issue with the hardware. If that is the case, a visit to a nearby Apple Store or a chat with Apple Support may be necessary.