If you are looking for detailed report for documents in a SharePoint site document library with created by, modified by and last modified time then you can refer below PowerShell script.

To run this script you have required site URL and Document name

Script

#Parameters
$SiteURL = https://teamsite.expertbrains.com/sites/sitename
$ListName= "Document Library Name"
$ReportOutput = "C:\Temp\Report.csv"
$Pagesize = 500
   
#Connect to SharePoint Online site
Connect-PnPOnline $SiteURL -Interactive

#Delete the Output report file if exists
If (Test-Path $ReportOutput) { Remove-Item $ReportOutput}

#Array to store results
$Results = @()
   
#Get all Documents from the document library
$List  = Get-PnPList -Identity $ListName
$global:counter = 0;
$ListItems = Get-PnPListItem -List $ListName -PageSize $Pagesize -Fields Author, Editor, Created, File_x0020_Type -ScriptBlock `
        { Param($items) $global:counter += $items.Count; Write-Progress -PercentComplete ($global:Counter / ($List.ItemCount) * 100) -Activity `
             "Getting Documents from Library '$($List.Title)'" -Status "Getting Documents data $global:Counter of $($List.ItemCount)";} | Where {$_.FileSystemObjectType -eq "File"}
  
$ItemCounter = 0
#Iterate through each item
Foreach ($Item in $ListItems)
{
        $Results += New-Object PSObject -Property ([ordered]@{
            Name              = $Item["FileLeafRef"]
            Type              = $Item.FileSystemObjectType
            FileType          = $Item["File_x0020_Type"]
            RelativeURL       = $Item["FileRef"]
            CreatedByEmail    = $Item["Author"].Email
            CreatedOn         = $Item["Created"]
            Modified         = $Item["Modified"]
            ModifiedByEmail    = $Item["Editor"].Email
        })
    $ItemCounter++
    Write-Progress -PercentComplete ($ItemCounter / ($List.ItemCount) * 100) -Activity "Exporting data from Documents $ItemCounter of $($List.ItemCount)" -Status "Exporting Data from Document '$($Item['FileLeafRef'])"        
}
  
#Export the results to CSV
$Results | Export-Csv -Path $ReportOutput -NoTypeInformation
   
Write-host "Document Library Inventory Exported to CSV Successfully!"