The serial number* is on the underside of the lid:
If your AirPods are connected to your iOS device, you can also go to Settings > General > About > AirPods for the serial number:
If you don't have your charging case, but you have the original packaging, you can find the serial number next to the barcode. You can also find the serial number on the original product receipt or invoice.
* With AirPods (2nd generation) and AirPods Pro, each AirPod also has its own serial number, printed on the AirPod itself. If you need to send your AirPods or charging case in for service, refer to the primary serial number, printed on the case lid. You don't need the serial numbers on the AirPods.