When creating a custom Drupal plugin manager the "drush generate plugin:manager" command is helpful in creating correctly structured boilerplate code for you.
This continues from last week's article, How to create a custom Drupal plugin. I recommend reading that first to understand the purpose of the files that will be generated. I will also be making reference back to the example module and files in those code snippets.
Setup
Obviously you will need to have Drush installed on your Drupal website to use this command, in most cases all you need is to run composer require drush/drush but otherwise I suggest reading Installing and Upgrading on drush.org.
Then simply run drush generate plugin:manager
The plugin-manager generator will then ask a number of questions to correctly name and locate the necessary boilerplate files additions and updates.