Since people rarely memorize phone numbers these days because we just save them in our contacts. If you need to use an extension number we usually just add the number in a note of the contact.
But on iPhone there's a better way. This guide will show you how to add the extension to the phone number of a contact so the extension number will be entered automatically when you call the number.
Open the keypad in your phone app and type in the phone number you want to add the extension number to.
Then hold your finger on the * key for a couple of seconds until a comma appears at the end of the phone number.
Once the comma is there. Add the extension number after the comma.
Then save the number to the contact (by taping the + ).
Now the number is saved with the extension at the end. When you call this number it'll dial the extension number for you.