trying to get old apple id on iphone 4

had iPhone 5s which got damaged due to water, so got iPhone 4 but wont accept old apple id. keeps asking for verification number after password.
Then enter the verification number.
You probably had Find my iPhone active on your damaged phone, thus Apple sends you a notification on that unusable phone. You should, however, have at least one other mean of contact, possibly your mobile, to send a text message with the verification number. You can also try to add a new number or device in your Apple ID settings: https://appleid.apple.com

Original thread: https://forums.imore.com/threads/trying-to-get-old-apple-id-on-iphone-4.371389/