The Providing configuration on install or update recipe of Chapter 6, Creating Forms with the Form API, discusses how to use a module to provide configurations on the module's installation. Instead of manually writing configuration YAML files for installation, the Configuration management module can be used to export configurations and save them in your module's config/install directory.
Any item exported through the user interface can be used. The only requirement is that you will need to remove the uuid key, as it denotes the site's UUID value and invalidates the configuration when it tries to install it.