How do you create a custom permission to administer a custom module?
Permissions can be added in the mymodule.permissions.yml file of the custom module.
You can also define permissions with a callback, if they depend on other items in the application.
See: https://kevinquillen.com/drupal/2016/02/21/dynamic-permissions-in-drupal-8