To change your phone number in your Yahoo Mail account, access to your account security settings. Click on Phone numbers > Add email or mobile no. and follow the instructions to add your new phone number.
In case you want to delete a recovery method such as your old phone number or old alternate email address, click on the pen icon regarding the recovery method, and select Remove from my account.
Also, you must have access to your account in order to make the change. If this is not the case, use the Sign-in Helper to recover your Yahoo Mail account. Once recovered, follow the instructions above to change your phone number.