Lost all contacts on phone after linking to google

I locally sync my contacts between Mozilla Thunderbird and the phone using MyPhoneExplorer.

When I once wasn’t fast enough to disable syncing to Google after a reinstall I noticed that MyPhoneExplorer is able to distinguish between contacts synced with Google and contacts stored locally on the phone.

3 of my contacts didn’t show on the phone anymore, but MyPhoneExplorer listed them separately as Google contacts. With MyPhoneExplorer I could then copy them back to the phone storage from there and could delete them at Google.

Perhaps you could try that.