Good day decoratingplus,
We understand that intermittently you're unable to send a message from your Mac to a few specific contacts. These contacts are a mix of iMessage and SMS contacts and though the issue does resolve, the same steps don't always help each time.
At the time you're encountering this, do messages transmit to these contacts on your iPhone OK? We'd like to have you quit the Messages app on your Mac, then on your iPhone go to Settings > Messages > Text Message Forwarding and turn off your Mac. At this point, restart both devices. Once restarted, on your iPhone go back to Settings > Messages > Text Message Forwarding and enable your Mac again. You'll be asked to enter a code that appears on your Mac. Once that's all set up, please test things out. Is there any change?
Do you use Messages in iCloud to sync Messages? You can verify on your Mac in System Preferences > Apple ID > iCloud or your iPhone in Settings > your name > iCloud. Also, please be certain both your iPhone and Mac are up to date. If they are not, create a backup of each and install any available updates.
How to back up your iPhone, iPad, and iPod touch
Update your iPhone, iPad, or iPod touch
Back up your Mac
How to update the software on your Mac
Let us know how these steps go.