The ones that weren't in your Google Contacts in the cloud were most likely entered into that device's Phone account, which is only saved locally, and doesn't sync or backup anywhere automatically. This is why I always recommend that people enter contacts into their Google account, not the Phone account. (For devices that have a Phone account, that's usually the default account, which makes the user have to take the extra step of selecting the Google account instead when creating a new contact. Pixel phones only have the Google account option, so there's never any confusion.)
The way you did it was the right way to get those contacts into your Google account -- export the contacts to a VCF file, then import that file into your Google Contacts.