We assume you’re using your AirPods with your iPhone, iPad, and Mac. Some tips here will also work if you use them with an Android phone, Windows PC, or other devices.
On iPhone, listening to YouTube audio in the background usually requires paying for a YouTube Premium subscription, but there is a workaround that allows you to keep listening to a video when your iPhone is locked. As YouTube has grown in popularity, Google has opted to park several features of the video hosting service behind a paywall, such as ad-free viewing, SharePlay on iOS, and the ability to listen to YouTube audio on your iPhone when the app is closed.