I think AndyDavid suggestion is correct:
If you synced all Exchange on-premises groups to Exchange online(Based on your description, I think you have synced all group). You need to create group on Exchange on-premises first, then you will could sync it to Exchange online. So, the synced group is created on Exchange online.
If you only sync a part of group to Exchange online, you will need to check from both Exchange on-premises and Exchange online:
Exchange on-premises created group:
Get-DistributionGroup -ResultSize unlimited | Measure-Object
Exchange online created group:
Get-DistributionGroup -ResultSize unlimited | where {$_.IsDirSynced -eq $False} | Measure-Object
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.