Export and Import Site Collection Term Groups using PnP PowerShell
Managed metadata allows the creation of central managed term sets that can be used as attributes in SharePoint sites, term sets can be created globally and shared across site collections or can be created locally to the site collection.
The PnP PowerShell includes commands to export and import terms groups but unfortunately the site collection term group is not exported automatically, this article provides a workaround to get all the site collection term sets into an xml ready to import into other site collections.