How Can I Recover My iPhone 5s Mail Contacts? Here's The Fix.
Unfortunately, when contacts are connected to an email account, they will be removed if the account gets signed out. This is what usually happens with expired passwords. In order to keep contacts there, you will need to transfer them to iCloud, which I have not found an easy way to do it.
Is it a lot of contacts or only a handful? If it’s a lot of contacts, you can export them from mail and import them into iCloud at iCloud.com via a computer. If it’s just a handful, you can enter them by hand into iCloud or redo them in your phone without connecting them to the email.