How to Sync Messages from iPhone to Mac
On your iPhone, go to Settings > Messages > Send & Receive. Add a check to both your phone number and email address. Then go to Settings > Messages > Text Message Forwarding and enable the device or devices that you want to forward messages to. Look for a code on the Mac, iPad, or iPod touch that you enabled.