Developers frequently need to determine if a module is active or inactive in a Magento 2 shop.
It occurs when utilizing third-party modules or when one has to verify whether a module is multi-store.
Implement the isEnabled() function, and check if a module is enabled or not programmatically Magento 2.
In Magento 2, you may explore a technique to determine programmatically whether a module is enabled or not by visiting,
https://meetanshi.com/blog/check-if-module-is-enabled-or-not-programmatically-in-magento-2/