You can easily create an instance (a template) from your SharePoint online site including lists,document libraries,settings,users,content types and export it to another SharePoint online site.
in powershell run below command
$cert=New-SelfSignedCertificate -Subject "CN=CompName" -CertStoreLocation "Cert:\CurrentUser\My" -KeyExportPolicy Exportable -KeySpec Signature -NotAfter (Get-Date).AddMonths(24)
in run -> mmc -> Certificates - Current User -> Personal -> Certificate
in certificate right click select All tasks then export
In the Certificates and Sectrets -> select certificates -> upload your self signed certificate.
Go to overview section and get the client id and tenant id and replace it in console app.