To connect AirPods to a MacBook, if they're already linked to your iCloud account they appear in the Mac's Bluetooth or sound menu — just select them. To pair fresh, open the case lid near the Mac, then choose the AirPods in System Settings → Bluetooth.
Connection Methods
Automatic (same Apple ID) ⚡ Wireless
Ensure your MacBook is signed into the same Apple ID as your iPhone.
Click the sound/Control Center icon in the menu bar.
Select your AirPods from the output list.
Manual Pairing ⚡ Wireless
Open System Settings → Bluetooth on the Mac.
Open the AirPods case lid and hold the back button until it flashes white.