How to remove mymodule configurations on uninstall
The easiest way is to ensure that the config has a dependency on your module.

dependencies:
  module:
    - yourmodule
  enforced:
    module:
      - yourmodule


Then Drupal will automatically remove that configuration and also warn in the UI that it will be removed.

Note that this only works for new installations, it won't fix existing ones.

An alternative is to put the configuration in config/optional instead of config/install, then it will only be created if it doesn't exist yet and the dependencies are met.