How to get all the disable module list Programmatically in Magento 2?

You can get the list of all the disabled module in Magento 2 by manually from app/etc/config.php.

Module with value equals to 0 is disable the module.

‘Klarna_Core’ => 0, Klarna Core is disable for system.

You can get all the Disable module list using Magento\Framework\Module\FullModuleList and Magento\Framework\Module\ModuleList class.

Check using Programmatically,

<?php
public function __construct(
    \Magento\Framework\Module\ModuleList $enabledModuleList,
    \Magento\Framework\Module\FullModuleList $allModuleList
) {
    $this->enabledModuleList = $enabledModuleList;
    $this->allModuleList = $allModuleList;
}

/**
 * Retrieve all disabled modules from the configuration
 *
 * @return array
 */
public function getDisabledModules()
{
    $allModules = $this->allModuleList->getNames();
    $enabledModules = $this->enabledModuleList->getNames();
    $disabledModules = array_diff($allModules, $enabledModules);

    return $disabledModules;
}

Call function from PHP file or template file, $this->getDisabledModules();

The output will be an array of all the disable module in Magento If none of the modules is the disabled result will be the empty array.

I have disabled all the Klarna Module, Result will be,

Array
(
    [100] => Klarna_Core
    [266] => Klarna_Ordermanagement
    [295] => Klarna_Kp
)

Check the blog, Get all the Enable Module list Programmatically Magento 2