Hello @Abhishek Mittal , sorry for the delay and thanks for clarifying.
Use Get-AzManagementGroup cmd to retrieve all groups. Review this content for the full list of supported Management Group PS cmdlets.
To return a specific management group and all the levels of the hierarchy under it, use -Expand and -Recurse parameters.
Other useful documentation: https://learn.microsoft.com/en-us/azure/governance/management-groups/manage
Hope this helps but dont hesitate to ping if you have any followup questions.