Check the pin and try connecting again speaker
Connect pin 5 to our 5K ohm potentiometer's left terminal via a 220uF capacitor. Connect the middle terminal to one end of the speaker's male headers and finally the right terminal should be connected to ground. Connect pin 6 to +5V and a 100uF capacitor connected from pin 6 to ground. That's it for the LM386!