If you're using AirPods (1st generation), make sure that your Mac is using macOS Sierra or later. Choose Apple menu > System Preferences, then click Bluetooth. If your AirPods appear in the list of devices* but they don't connect, remove your AirPods from the list: Select your AirPods in the list of devices.
See: https://technumus.com/how-to-connect-airpods-to-mac/