Using the new PnP provisioning engine, you can export the schema for an existing document library or list, then import it in a new environment.

Here is the code using SharePoint PnP powershell.

Connect-PnPOnline "https://yourtenant.sharepoint.com/sites/yoursite" -UseWebLogin
Export-PnPListToProvisioningTemplate -List "Documents" -Out template.xml

#connect to new environment or site
Apply-PnPProvisioningTemplate -Path template.xml

Update

These commands have been renamed to

Export-PnPListToSiteTemplate
Invoke-PnPSiteTemplate