How to change the entity view display configuration programmatically?
There are two configuration types. Simple configuration and configuration entities. In this case this is a configuration entity. The class name is in camelCase:

EntityViewDisplay.php

class EntityViewDisplay extends EntityDisplayBase implements EntityViewDisplayInterface


If you have a config entity for the configuration, you can load the config entity,

$storage = \Drupal::entityTypeManager()-&gt;getStorage('entity_view_display');
$view_display = $storage-&gt;load('node.article.default');


modify it and save it:

$view_display-&gt;save();


Why you want to use config entities?

You can get the array of the configuration:

$config = $view_display-&gt;toArray();


This is not different from what you get in the yml file or config api.

The advantage is, that config entities usually have method for special configuration tasks. With displays this is for example to add or remove components:

$view_display-&gt;setComponent('body', [
     'type' =&gt; 'text_summary_or_trimmed',
     'settings' =&gt; ['trim_length' =&gt; '200'],
     'weight' =&gt; 1,
   ])
   -&gt;removeComponent('field_image')
   -&gt;save();


That is much easier than to do this in the configuration array.