It must be some issue with software, and how it manages loudspeakers/earphones and call speakers. I've experienced this a few times, sometimes safemode helps, sometimes not... If I'm correct, it tends to happen after a messenger call (but not 100%) sure, also charging at the moment of the call might be an issue connected, what's odd, is that at the moment, I'm still getting sound out of the call speaker (for your ear, they do emit sound aswell to add to the quality) but the main speaker doesn't work for any apps or even resetting, yet when i was on a phone call, once I hit the loudspeaker button, it turned on without a problem (what immediately points to software as hardware clearly works) its not an old problem as it only began maybe a month ago.
Also weird side note, instead of my normal alarm music, it just gives out distinctive beeping sounds through the earpiece speaker... (no loudspeaker) which was even more odd...