I worked with a customer that had a requirement to have a central document library linked to many teams.
My first though was to just create the TEAM and link a TAB to SharePoint library. I than used this as a template when I created the next TEAM. I was disappointed when I realized that I got the TAB in the new TEAM but it did not automatically connected to the same data source.
Here is a pic from the configured Template:

Here is the experience when I create next TEAM using the first one as Template:

The Template idea was not so great. My next though was Graph API. I start to go to Microsoft Graph Explorer. I start with sign-in and grant myself read/write permissions on Groups. I run a query to get the information about the tab:
{
"id": "",
"name": "General%20central%20documents",
"displayName": "General%20central%20documents",
"teamsAppId": "com.microsoft.teamspace.tab.files.sharepoint",
"sortOrderIndex": "10100",
"messageId": "1578989421690",
"webUrl": "https://teams.microsoft.com/l/channel/19%3a19d5a4be4eb441eea36995e9d3358bf7%40thread.skype/tab%3a%3abf99f225-8ec4-494b-9b32-d28bc938eb6c?label=General%2520central%2520documents&groupId= ",
"configuration": {
"entityId": null,
"contentUrl": "https://tenant.sharepoint.com/sites/DocumentSite/Shared Documents",
"removeUrl": null,
"websiteUrl": null
}
From this result I can now figure out how to configure this TAB in a new TEAM. I open my favorite program “Visual Studio Code” for editing Code and put together the query to create my TEAM.
POST https://graph.microsoft.com/beta/teams
Content-Type: application/json
{
"template@odata.bind": "https://graph.microsoft.com/beta/teamsTemplates('standard')",
"visibility": "Private",
"displayName": "HBG Team",
"description": "This is a Example of a team with a linked SharePoint Site in TAB",
"channels": [
{
"displayName": "General",
"isFavoriteByDefault": true,
"description": "General Channel",
"tabs": [
{
"teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.files.sharepoint')",
"name": "General central documents",
"configuration": {
"entityId": null,
"contentUrl": "https://tenant.sharepoint.com/sites/DocumentSite/Shared Documents",
"removeUrl": null,
"websiteUrl": null
}
}
]
}
]
}
Now when I look in the Teams client I have a new Team created and SharePoint library is perfectly mapped.

Hope this will help you when you building Templates for Teams.
Regards
Jimmy Lindö