You need to enable social login (OAuth 2) as one of your site’s authentication methods. Log into your Moodle site as an admin and navigate to the “Manage authentication” page:
Site administration > Plugins > Authentication > Manage authentication
Find the “OAuth 2” option on the page and enable it by clicking the closed-eye icon.
Navigate to the “OAuth 2 services” page to add your desired social logins:
Site administration > Server > OAuth 2 services
Click the “Create new Google service” button,
and enter your Client ID and Client secret on the settings page as shown in the figure below and save the changes.