Revisiting Google Contacts on iPhone
A few years back I did a post on getting Google contacts on your iPhone if you don’t use GMail (https://davidschaffer.wordpress.com/2017/01/27/google-account-without-mail-on-iphone/). I recently got a new iPhone and followed the same method but login failed.
The trick is that since that post two-factor authentication has become a thing. The workaround is to create an app password on Google and use that to set up the CardDAV account.
Go to your Google account page and click on Security on the left. Then in the Signing in to Google section you will see App passwords. Create the app password for Contacts (or Calendar if that’s what you’re after) and use the code it generates as the password when creating the account on your device.