I tried every fix that was on offer as I tried to address the LACK of CONSISTENT notifications in Messages on my iPhone X. I did get the odd notification for a couple of contacts, but did not receive notifications for ALL contacts. Such inconsistencies render Messages rather useless.
Then I decided to check this site one last time, hoping that somebody had a new (and productive) solution to finally fix this issue before calling Apple directly.
The post by GuitarPlayersAnonymous where he references this issue within iOS 11 on 18 February fixed the problem for me! He suggested going to the messenger app where there is a listing of your messenger contacts. Simply slide each contact to the left where You will be asked if you wish to HIDE or SHOW
notifications for each of your contacts within Messages. For whatever reason, the majority of people listed in Messages on my iPhone X were set to HIDE alerts. I simply followed the suggested fix of GuitarPlayersAnonysous and PROBLEM SOLVED!
I still don’t understand WHY this step needs to be done, as I’ve never had this issue on any of my previous iPhones. But, I’m now receiving notifications for all my texts: problem solved. Why not give it a try? Thanks again, GuitarPlayers Anonymous, and good luck to everyone else in resolving this issue.