Cut off the connector and connect one wire from the mini speaker to pin 5 (C6) and the other to GND on the master side. Depending on your case and how you position it, it might be necessary to remove the cap of the speaker to make it fit. Secure it with some tape or glue so it doesn't short circuit anything.
Speaker (Left Hand)
In QMK you need to enable audio AUDIO_ENABLE = yes
and #define C6_AUDIO
,
see Documentation: QMK Firmware - Audio.
You can't both have RBG Underglow and Audio enabled at
the same time since the firmware will be to large to fit in a Pro Micro.