I have created a payment method module in Magento 2.4.4 after a lot of trial and error and I finally have a small working version that works both in the adminhtml and the frontend.
The problem I have is that when I set it as “Enabled” > “No”, it still appears in the checkout page and the observers are still running.
I looked through other answers, like this one from in here and I seem to have my own XML structured correctly.
What exactly is the trigger point/code for Magento to enable/disable a payment method so that I am able to debug this?