When I checked with GitHub support, they have shared me below links.
To get repository id -- https://developer.github.com/v3/repos/#get-a-repository
To get installations details -- https://developer.github.com/v3/orgs/#list-installations-for-an-organization
To add repository to an installation -- https://developer.github.com/v3/apps/installations/#add-repository-to-installation
I used these links to create below mentioned code which has helped me to implement the desired requirement.
# Header to use in request
header = dict()
header['Authorization'] = 'token %s' % personal_token
header['Accept'] = 'application/vnd.github.machine-man-preview+json'
# Fetching repository id
url = f'https://api.github.com/repos/{organization_name}/{repo_name}'
output = requests.get(url, headers=header)
repo_id = output.json()['id']
# Adding repository to Google Cloud build installation
url = f'https://api.github.com/user/installations/{gcb_installation_id}/repositories/{repo_id}'
output = requests.put(url, headers=header)