External speaker on my phone stopped working. Any idea how to fix it

Playing around I’ve found that the audio when I am making a call still works but if I put it on speakerphone, I don’t get any audio. On regular phone mode it works fine.

Headphone jack works fine too. I can plug it in and hear audio like that. But today the regular speaker audio quit working.

Any way to fix this? Will the cell phone carrier repair this if its a pre-paid plan?

Its bad enough the phone doesn’t recognize wifi for making and receiving calls. I’m starting to dislike android.

So I found a youtube video that recommended installing an app called ‘headset toggle’ that’ll automatically toggle the audio to the external speakers.

I didn’t even open the app, just downloaded it and now the speaker works again. All 3 speakers seem to work (handheld phone, external speaker and headphone jack) from downloading an app I didn’t use.

Any idea whats going on? The hardware of the speaker seems fine.