First, create a course like you want the template to look & work.
Then, make sure that you remove everything which you don't want in the template. Typically, you don't want any enrolled users and dummy data. We recommend working with placeholders.
When you're ready, create a backup of your course and download the .mbz file.
Go to the template management page, give your template a title, description, tags, a preview URL (could be the course you created the template with) and the .mbz file.
If you're using pro, you can configure the access to the template.