Mac Messges application not getting messages

Recently my Messages application is not getting messages that I get on my iPhone. I haven’t changed any iCloud settings. In Messages::Preferences::iMessage I checked that Enable Messages in iCloud is on, and I’m signed in to iCloud.

MacOS 12.3.1

I assume you’ve tried to turn iCloud messages off on each device, log out of iCloud on each device, log back in on each device and then turn iCloud messages back on?

There’s a sneaky setting in IOS settings that can trip you up. In order for a device to be able to send and receive SMS messages, it must be in the list of the Settings>Messages>Text Message Forwarding setting. If not, it won’t see SMS messages. Not setting this up for devices that appear as new will cause problems. Not that certain operations on a device e.g. re-installing the OS) will cause it to be considered a new device for these purposes.

I don’t see how to log out of iCloud on my iPhone or on my Mac.
EDIT: I found 'em

P.S. The likely cause of this problem, based on chronological nearness, is having changed my Apple ID password four days ago after getting a notice of a login attempt that, due to the time it occurred, wasn’t me.

That setting is turned on for my Mac.

Seems to be OK now.

Is that why some devices are listed twice or even three times? Regardless if that’s the reason, how do I delete duplicates of the same device? Thanks.