When you create a new subgroup, you can check Inherit courses from parent group. This will automatically keep the subgroup up-to-date with course enrollment from its parent group.
If you want to have a parent group's courses automatically assigned to a subgroup during its creation, check out this article.