Use the Get-MgGroupTransitiveMemberAsUser cmdlet that’s part of the Microsoft.Graph.Groups module.
# Just get all Microsoft.Graph modules, including Microsoft.Graph.Groups
Install-Module Microsoft.Graph
# Specify the Entra ID object ID of the group
$groupId = '<your group ID>`
# Connect to the Graph API. Use an account that has permissions to (minimally) read all group information
Connect-MgGraph -Scopes "Group.Read.All"
# Call the MS Graph
Get-MgGroupTransitiveMemberAsUser -GroupId '<your group ID>'