The easiest way to do this is to go to your settings then your messages after you find messages you will click “Send & Receive” there you will add your email or number and wait for a few seconds then something should pop up on your mac asking if you want to use both your number and email for imessage and facetime you will then click ok and you can go back to your icloud on your phone and sync your messages with your Mac. Hope this helped!!