You will need a custom module to place code into to implement a configuration entity type. Let's create an src directory for your classes. Refer to the Creating a module recipe of Chapter 4, Extending Drupal, for information on creating a custom module.
Do not use a module that is currently installed, otherwise Drupal will not install your new entity type.