Is this for iMessage?
Try deactivating, rebooting, then and reactivating iMessage in settings. If this doesn't work, then do a full sign out of your Apple ID, reboot, and then sign back in.
Usually the number should automatically be detected and updated, but sometimes you have to do the above to give it a nudge in the right direction.
Let me know if these don't work.