Why do some of my contacts not sync with Google?
Based on your description and follow-up comment it sounds like those few contacts got added to the On my phone group. You can check this by tapping the Groups button within Contacts (first screenshot below for reference) and then unchecking Gmail, which should leave just On my phone selected. If that shows the troublesome contacts, you have your answer.

Unfortunately there's no easy way to move contacts between accounts from Contacts. You have two options:


Copy each one manually.
You could tap Share Contact, Save to Files, delete the person from Contacts, then open in Files, open the Share Sheet, and tap Copy to Contacts. That should import it to your default account of Gmail. Second and third screenshots below for reference.