You need to have a Discourse development install. For example, Developing Discourse using a Dev Container
After install it, run
rake plugin:create[your-plugin-name]
It will pull discourse/discourse-plugin-skeleton: Template for Discourse plugins to generate a plugin with the most modern and recommend starting template.