Thread:BannedLagiacrus/@comment-38816563-20191122141648/@comment-26421638-20191123093756

Make a new page and name it "Template:sample" (then of course put your desired template name instead of sample)

Before appearing our well known page editor, appears a pop-up window where you can choose from different options available.

If you wanna make a completely new template, scroll down and pick "unknown" and you're completely free to do a new template from scratch.

How to do a new template, varies a lot since to have to set pretty much everything, I'd suggest to copy-paste something from other templates, trough edit page or view source (in case of locked templates)