The Messages app on your Mac allows you to receive and reply to all of your messages across your iPhones, iPads, and Macs. To enable this feature you'll first need to ensure that you're logged into the same Apple ID on your iPhone and Mac. Once this has been confirmed, open Settings on your iPhone and tap Messages, then Text Message Forwarding. Toggle the On switch for the Mac(s) and other devices you wish to receive messages. As long as your iPhone is connected to your cell network or Wi-Fi, new text messages will also be received on your selected devices.