Initially, Created Single Tenant Microsoft Entra ID application:

Added application type Group.ReadWrite.All and GroupMember.ReadWrite.All API permission and granted admin Consent like below:

Now Generated Access token using client_credentials flow.
Use below parameters:
GET https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded
client_id: <application-id>
client_secret: <client-secret>
scope: https://graph.microsoft.com/.default
grant_type: client_credentials
Response:

Before, creating the group, check for any policy is configured for naming-convention while creating of the Unified groups.
Connect-AzureAD
Get-AzureADDirectorySetting | Where-Object {$_.DisplayName -eq "Group.Unified"}
$setting = Get-AzureADDirectorySetting | Where-Object {$_.DisplayName -eq "Group.Unified"}
$setting.Values

Ensure to set the name of the group, As per the directory setting.
POST https://graph.microsoft.com/v1.0/groups
{
"displayName": "InternalExternalTeam-Operations-",
"description": "Group for the Internal and External department",
"groupTypes": ["Unified"],
"mailEnabled": true,
"mailNickname": "InternalExternalTeam-Operations-",
"securityEnabled": false,
"visibility": "Private"
}
Response:

After creating the group adding the member from the tenant.
For adding the member you need to use only object-id of directory-objects. Below query is applicable for users from tenant, guest users , contacts.
POST https://graph.microsoft.com/v1.0/groups/{group-id}/members/$ref
Authorization: Bearer <access_token>
Content-Type: application/json
{
"@odata.id": "https://graph.microsoft.com/v1.0/directoryObjects/{object-id}"
}
