Your iPhone has a Lightning port. Your Mac has USB-c ports. So you need a cable that has both, like this.

I copied this from Amazon, because it showed the plugs clearly. But I haven't used this particular cable, and I have no opinion about it. This cost about $12.
If you have the Lightning cable that came with your phone, it has a USB-A connector. With that, you can use an adapter from USB-A to USB-c, like this:

I have, actually, bought this, and it works well. You can plug your original USB-A cable into the phone and into this, and then plug this into the Mac. If you're new to this USB-c thing, you'll find these adapters to be very handy for connecting all the old stuff to the new computer. This pair costs about $10.
Let us know what you do...