iPhone not making a sound when receiving text or mail.
Congratulations to diureticmedic @iMore forums.
After looking through endless pages of answers to this issue, which included full factory resets, messing around with headsets and chargers and gawd knows what else, the answer was a very simple one.
If you have the crescent moon at the top of your screen, it means you have turned on Do Not Disturb. And that means incoming messages or mail won't make a sound.
Just go into Settings and turn off Do Not Disturb, and bingo, your phone will make all the necessary noises again. Sigh!