There are two methods of viewing your OneDrive usage.
The numbers displayed in both your M365 Account Sidebar and your M365 Storage Metrics, when added together, should equal your total current quota. In the example image below, the M365 Account sidebar displayed 297.8 GB of used storage from a quota of 511 GB, and the M365 Storage Metrics for the same account displayed 213.15 GB of free space from a quota of 511 GB. Added together, these values equal 510.95 GB (511 GB after rounding).
The storage usage displayed at the bottom of your M365 sidebar is the storage you are actually using which counts against your quota.
The M365 storage metrics page provides a detailed view of what folders and files are taking up the most storage in your OneDrive. The total storage used may not be the same as reported by the M365 account sidebar due to the way the storage is calculated. For the most accurate report of the OneDrive storage you are using, always refer to the M365 account sidebar.