I believe the product doesn’t offer support for this feature. While you can certainly examine the group membership, removing access from nested groups or indirect memberships may not be possible. Nevertheless, you can utilize certifications to evaluate these indirect memberships and explore options to simplify the certification process by potentially removing nested groups.
Unnesting your groups is further justified by the fact that the nesting of groups can frequently become unmanageable and spiral out of control. This can result in a disorderly and cumbersome situation, ultimately leading to a loss of control over who has access to what. Ironically, this situation contradicts the very purpose for which groups are utilized in the first place.