Why are some SMS-recipients reachable through iOS but not macOS?
On your computer, open the person’s contact card in Contacts/Address Book
Verify that the phone number you are attempting to use is classified as something other than “iPhone” (e.g. “Work” or “Mobile”)
Ensure you don’t have multiple contact cards for the same person, and create one for them if one doesn’t currently exist

If that doesn’t work, it might be worth trying to sign-out and back in to iCloud on both your computer and your iPhone, after re-booting both devices first.
(As for the messages when they were previously using an iPhone, the may have had “send all messages as SMS” enabled, or they didn’t a reliable mobile data connection while messaging you.)