How to Check if a Module is Enabled or Not Programmatically in Magento 2
Developers typically need to know whether a module in a Magento 2 store is active or dead.
When using third-party modules or when determining whether a module is multi-store, it happens.
Put the isEnabled() method and check if a module is enabled or not programmatically in Magento 2.
You may examine a method in Magento 2 to find out programmatically whether a module is enabled or not by going to, https://meetanshi.com/blog/check-if-module-is-enabled-or-not-programmatically-in-magento-2/