Sounds like some sort of interference. First option is always disconnect any form of wireless connection so turn off Wi-Fi and Bluetooth then turn them back on try you AirPods again if the issue still persists you will need to see what firmware they are running. To do this you will need iPhone, iPad or Mac.
Firmware updates are delivered periodically while your AirPods are charging and in Bluetooth range of your iPhone, iPad or Mac.
Because firmware updates are delivered automatically, you don't need to update your AirPods.
To use your iPhone or iPad to check that your AirPods are up to date, make sure you have the latest version of iOS or iPadOS. Go to Settings > Bluetooth, then tap the Info button next to the name of your AirPods. Scroll down to the About section to find the firmware version.
To use your Mac to check that your AirPods are up to date, make sure you have the latest version of macOS. Press and hold the Option key while choosing Apple menu > System Information. Click Bluetooth, then look under your AirPods for the firmware version. With macOS Ventura, you can also choose Apple menu > System Settings, click Bluetooth, then click the Info button next to the name of your AirPods.
once you know the firmware you can see if there’s an update and that will usually allow them to be more compatible with devices. If you don’t have the above Apple Store can do this for you