If you need to remove a phone number that belongs to an iPhone you no longer have, changing your Apple ID password will remove the number from your Apple ID. [1] X Research source

You can only delete a number this way if it’s not the one being used for Messages and Facetime. If you don’t see the option to delete the phone number, and instead see a warning that the number is being used for Messages or Facetime, follow these steps: Tap the back button until you’re back in the Settings menu. Scroll down and tap Messages. Tap Send & Receive. Tap your Apple ID at the bottom. Tap Sign Out. Once you’re signed out, tap the back button until you’re back at the Settings menu, and then tap FaceTime. Tap your Apple ID under “Caller ID” and select Sign Out. Now that you’re signed out in both locations, the old phone number is no longer associated with your iPhone.