Controlling settings, permissions, and membership within Teams and channels
The second link has examples on how to archive based on group ID and with or without option to make it visible to members.
This link shows how to arkive based on cvs file containing the list of ID
https://office365itpros.com/2020/07/03/archivin...
External Links Disclaimer for non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.