I would like the change the menu setting on the header block when a user enables the Tatsu theme.

Is there any way to do that?

Here is the code I would use in hook_install for a module, is there a version of this for a theme:

  $layouts = layout_get_all_configs('layout');
  foreach ($layouts as $layout_name => $layout) {
    foreach ($layout['content'] as $block_id => $block) {
      if ($block['plugin'] === 'system:header') {
        config_set('layout.layout.' . $layout_name, 'content.' . $block_id . '.data.settings.block_settings.menu', 'my-menu-id');
      }
    }
  }