Problem Summary
You may see a previous number showing up on an old smartphone of yours, or one that’s been given to you, even after a complete erase and reset of the phone.
On an Apple iPhone, if it is logged in using an Apple ID and iCloud account, when you login at Apple [appleid.apple.com], you will see the device listed, and an old phone number may be showing for the device along with the other details about the device model and serial number.
On the iPhone, under Settings > Phone, the old phone number will show up there as well.
This is most likely because the old SIM is inserted and the phone is displaying the number originally associated with the SIM.
Problem Solution
To remove the old number, remove the SIM card that is causing it to display. This will result in the phone number no longer showing on the phone, and also will result in an updated entry in your Apple account.
Benefits of an Old Smartphone
Having an additional old smartphone can help you stay logged into an additional user account and it can be used for account management tasks not possible with a web browser. This is particularly true with Apple accounts.
Sometimes with Apple services you will be told, “Please use an iPhone or iPad to adjust this setting or access that option.”