What is the correct order of disabling the default contact form on Drupal?
You may be able to use this (untested) approach in your hook_update_N() implementation:
function my_profile_update_8011() {
  $config = \Drupal::configFactory();
  $moduleHandler = \Drupal::service('module_handler');

  $mods_removable = [
    'lightning_contact_form',
    'contact_storage',
    'contact',
  ];

  // Read the configuration.
  $module_data = $config-&gt;getEditable('core.extension')-&gt;get('module');

  foreach ($mods_removable as $module) {
    if($moduleHandler-&gt;moduleExists($module)) {
      // Unset the modules you do not need.
      unset($module_data[$module]);  
    }

  // Write the configuration.
  $config-&gt;getEditable('core.extension')-&gt;set('module', $module_data)-&gt;save();
  }

See this answer for additional info.