YOu cannot. Yahoo now requires a 2 step authentication, one step of which is to send a text to the phone on record. I wold not attempt that, as the person who has that number, will be able to hack you account!!!!!
There is nothing you can do.
Always create accounts on a landline IP (non-mobile) network. Then recover the account a couple of times. Then after you are aware of how to recover the account without a mobile, attach the mobile. Then if you lose the mobile, it is stolen, or you don't pay the bill, you can always get back into your accounts and change the number!!!
Too little, too late!