If you find out you do not get messages and cannot send them when you are on a stock rom (at least it happened to me when I flashed stock rom and locked bootloader)
Open the Phone app and dial: ##4636## Go to Phone Information. Scroll to the bottom to find SMSC. Tap Refresh. If it stays blank, you need to find your carrier's SMSC number (Google "Carrier Name SMSC number") and enter it there, then tap Update
Try removing SMS permission for Message app and granting it again