To get the size of a document library in SharePoint Online, Login to your SharePoint Online site >> Click on Settings >> Site Settings >> Click on the "Storage Metrics" link. The storage size of your document library is under the "Total Size" column. You can also use PowerShell to obtain the document library size. More info: Check SharePoint Online document library size