You might get a request to export all users details who have access on specific site and their permission level as well. You can user below syntax to get the report:
Connect-SPOService -url https://*org-name*-admin.sharepoint.com
$tenant = "<tenant name, such as expertbrains for expertbrains.com>"
$site = "<site name>"
Get-SPOUser -site https://$tenant.sharepoint.com/sites/$site | select * | Format-table -Wrap -AutoSize |Out-File c\UserReport.txt -Force -Width 360 -Append
If you have more than one site then you can run it for each site and it will append the data. You just need to change the $site variable.
If you wanted to do for every site then you can follow below syntax
Get-SPOSite I ForEach {Get-SPOUser -Site $_.Url} | Format-Table -Wrap -AutoSize | Out-File C:\UserReport.txt -Force -Width 360 -Append