Power off phone remove SIM card(s). Power up phone allow to get all services running. Power off reinstall SIM card(s).
Check if your phone is using the correct message center number. Contact the customer service of your carrier and ask for the message center number. Make the necessary changes in your device.
Try to use the stock messaging app if you are using a third party messaging app
Clear the cache and data of the messaging app
Start the phone in Safe Mode then check if the issue occurs in this mode. If it doesn’t then an app could be causing the problem. Find out what app this is and uninstall it.
Wipe the cache partition of your phone.
Backup your phone data then do a factory reset.