All the tricks shown in videos don’t work at all and are silly.
The reason it doesn’t work, is because of a combination of the membrane getting dirty and sticky, and a pressure difference between the inside and the outside. (Due to it being airtight.)
Do not blow into the headphone jack or anything! It may destroy your speaker membrane, to get it moving! Moving doesn’t help getting rid of the dirt that blocks the membrane from moving freely either.
The solution is to first wash the outside of the speaker, thoroughly, with normal dishwashing liquid in warm water, and let it dry for at least 24h.
Then just open the top and bottom rubber flaps, to make sure the pressure is balanced.
It will work then.
If it still makes scratching sounds, like a broken speaker, it is because the case is a sliight bit lose. E.g. when I press against the back panel center (not on the speaker), to keep everything in its place, the sound becomes normal.
I guess if that is the case, only putting it firmly in place will help. Also, parts being lose can mean your device is not 100% watertight anymore. E.g. if it is the speaker itself that is loose. (Unlikely, but possible. E.g. if you use too strong cleaning agents, that will definitely happen.) So beware!
I myself, unscrewed the back panel, using a set of special tiny screwdrivers from the neared China market / flea market, checked that everything is in place, and screwed the screws back not looser or tighter than they originally were. (Beware!Too tight screws will ruin the thing even more than too lose screws! Use common sense!)
Now it works fine again. Unless it gets dirty and the dirt sticks to the speaker hole/membrane again, of course.