If you are receiving SMS or iMessages on your Mac but not on the iPhone you are checking, it does not necessarily mean that those messages were received by that particular iPhone.
A Mac can receive and display messages associated with multiple Apple devices signed in to the same Apple Account (Apple ID). Depending on the Messages and iCloud configuration, the Mac may receive iMessages through the Apple Account and SMS/MMS/RCS messages through Text Message Forwarding from one or more iPhones.
Therefore, if a message appears on the Mac but is absent from the iPhone you are looking at, it is possible that the Mac received it through another iPhone or another messaging route associated with the same Apple Account.
In other words, seeing a message on a Mac does not, by itself, prove that the message was received on or sent through a particular iPhone.
This distinction is especially important when several iPhones are signed in to the same Apple Account. The Mac can act as a common Messages endpoint, while individual iPhones may have different phone numbers, SIM/eSIM configurations, iMessage settings, or Text Message Forwarding settings.
So, to determine which iPhone actually received an SMS, you need to check the Text Message Forwarding and Messages settings on the individual iPhones rather than assuming that the message displayed on the Mac originated from the specific iPhone you are investigating.