Using the Graph against OnPrem Mailboxes is still in preview see https://learn.microsoft.com/en-us/graph/hybrid-rest-support so you need some specific configuration and server requirements.
Graph API is working fine for the online exchange users (O365) not for offline users (local users), but there is another problem too. Graph API provides Rest APIs by using which we can access each mailbox individually which will become very server loaded work if more than 1000K mailbox need to be scanned one by one and also a time taking process.
If your comparing what you can do with the Graph against what you can do with Search-Mailbox and Compliance searches in Exchange Online/OnPrem you won't be able to match the performance those server side features are designed specifically for the purpose while the client API's like Graph are more for 1 to 1 client access of the Mailbox so things like throttling will always be a constraint. On the Exchange Online side things like Graph Data Connect https://learn.microsoft.com/en-us/graph/data-connect-concept-overview changes the paradigm and gives you easy access to Mailbox data at massive scale (but at cost).