How to retrieve ConfigEntity instance from config factory?
\Drupal::config()


  Retrieves a configuration object.
  
  This is the main entry point to the configuration API. 


The configuration API is a different system than the entity API.

$entity = \Drupal::entityTypeManager()
  -&gt;getStorage('my_config_entity')
  -&gt;load($id);


Configuration entity types should be used to store configurable content like content types or other site builder-esque things that you want to deploy from environment to environment that is not managed content (Something a content author would write).

If you're looking for a complex configuration object, then you should define that in config/mymodule.settings.yml and use the configuration API like in your question.