In the Sound System Settings, make sure the EarBuds are shown as an Output device option, and make sure to click on them to highlight & select the EarBuds to be the output source. If earbuds are not seen by the system, then you have a hardware issue of some sort (bad earbuds/cable, port, etc.).
Check the Privacy & Security System Settings to make sure the earbuds have permission to access the audio (not sure this is needed).
If it is an M-series Mac and these are USB based earbuds, then make sure you have given approval to allow the USB earbuds permission to connect to the system. Sometimes the pop-up notice to request approval for external devices to connect can be missed or not even pop-up at all.
If your Mac asks you to allow an accessory to connect - Apple Support