On your phone, go to Settings, scroll way down to Messages.
Send & Receive -- should show your phone number and an Apple ID associated with your Mac. You also need to be signed in on that Mac to that Apple ID in Messages.
Text Message Forwarding -- should show your Mac
If these are correct, on Mac sign out of Messages and sign back in.
If they are not correct on your phone, check at top of the Messages portion inside Settings, iMessage should be toggled on. If it is, toggle it off, then on again. On Mac log out of Messages and then sign back in. It should show up in the above two places in the phone settings. Forwarding has to show it or the forwarded messages won't come to the Mac, they are actually "forwarded" to the Mac from the phone.