You can follow this steps i hope this steps helpful for you.
Check your device settings
Make sure that you’re connected to a cellular data or Wi-fi network.
Go to Settings > Messages and make sure that iMessage, Send as SMS, or MMS Messaging is turned on (whichever method you're trying to use). Learn about the different types of messages you can send.
Check the recipient's contact info
Make sure that you're using the right phone number or email address.
Go to Settings > Messages > Blocked and make sure that they're not on your block list.
Delete existing conversations
If you can't send messages to a certain recipient, delete any conversations you have with them and try sending a new message. When you delete a conversation, you won’t be able to recover it. Make sure that you take a screenshot a or forward any messages that you want to keep.
Restart your device and check for updates:-
Restart your device.
Check for a carrier settings update.
Check for an Ios software update.
Contact your carrier
If you can't send or receive SMS or MMS messages, contact your carrier to check your text messaging plan.
Check the system status for iMessage
Go to the Apple services system status page and check iMessage.
Turn iMessage off and back on
Go to Settings > Messages and turn iMessage off, then back on.
Sign out and back in to iMessage and FaceTime
1. Go to Settings > Messages > Send & Receive, tap your Apple ID, then tap Sign Out.
2. Go to Settings > FaceTime, tap your Apple ID, then tap Sign Out.
3. On your iPhone first, sign back in to iMessage and Facetime.
4. Sign back in to iMessage and Facetime on your other devices.
Reset your network settings
Tap Settings > General > Reset > Reset Network Settings.
Back up and restore your device
Use iTunes or iCloud to back up your content, then restore your device.