Magento 2 Get all the Enable (Active) module list programmatically.

You can get the list of all Enable module in Magento 2.  You can manually check your all the enable module list from app/etc/config.php file module name with status set to 1.

‘Magento_Store’ => 1 Store Module is Enable.

‘MSP_ReCaptcha’ => 0 Recaptcha Module is disable.

You can get all the Active module list using Magento\Framework\Module\ModuleList class. ModuleList class used for getting all the active module list.

Check via Programmatically,

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

Result will be array of all the active module,

You can check the Get dependent module list for a specific module Magento 2