For getting these different user group members, it may better for you to use PowerShell in SharePoint Online Management Tool.
$AdminCenterURL = "https://domain-admin.sharepoint.com/"
$siteURL="https://domain.sharepoint.com/sites/SiteName"
#Get Credentials to connect
$Cred = Get-Credential
#Connect to SharePoint Online and Azure AD
Connect-SPOService -url $AdminCenterURL -Credential $Cred
Connect-AzureAD -Credential $Cred | Out-Null
$Site = Get-SPOSite -Identity $siteURL
#Get Unified Group Owner
Get-AzureADGroupOwner -ObjectId $Site.GroupID | Select -Property DisplayName,UserPrincipalName
#use Pnp to get site collection admin, which is the additional admin
Connect-PnPOnline -Url $Site.Url -Credentials $Cred
Get-PnPSiteCollectionAdmin | Select -Property LoginName, Email
#get the site owner gruop members and site member group members
Get-SPOSiteGroup -Site $siteURL | where {$_.LoginName -like "<GroupName>*" }|select -Property LoginName,Users
As they are in different format, it may be better for you to get all the required properties and format them before you export to .csv file.
The last part i use {$_.LoginName -like "<GroupName>*" }
as the group-connect site has groups like <GroupName> Owners/members, remember to change that part with the name in your site.
For add and remove user from these groups, here are the cmdlets you can use.
Add-AzureADGroupOwner (Add Unified Group Owner)
Remove-AzureADGroupOwner
Add-PnPSiteCollectionAdmin (Add site collection administrator)
Remove-PnPSiteCollectionAdmin
Add/Remove user from group:
Add-SPOUser
Remove-SPOUser
Example:https://www.sharepointdiary.com/2016/01/sharepoint-online-remove-user-from-group-using-powershell.html
If the answer is helpful, please click Accept Answer and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.