Have you installed the latest iOS updates on your iPhone and macOS updates on your Mac? I believe both of them just had new updates released.
Try rebooting the iPhone by powering it completely off. I also recommend closing all the open apps first before powering off the phone. Once the iPhone is completely powered off, then power it back on. You may want to reboot the Mac as well, but best to try one at a time so you can see if the issue is with just one of the two devices. Again, make sure Messages on the Mac is completely closed using Command + Q, or by clicking "File --> Quit" in the Messages app.
If this does not work, then try the steps which worked last time. Again, try those steps on just one of the devices first to see if the issue is with just one of those devices.
Every once in a while on my iPhone I have to toggle Messages off & on. Sometimes along with the SMS switch. So it would not surprise me that you may have to do something similar. I've also had some issues on my Mac as well which has required me to logout of my AppleID & log back in.
Maybe another more knowledgeable contributor will have some better ideas. I'm no expert with Messages/iMessages.