Hello Fazul,
Downloading and installed modded or general APK's from website always comes with a risk, there is no catch all protection for this since you are authorising the downloaded app to be installed on your phone. which overrules built in protections. you were also required to allow APK's to be installed from the browser you use for this. that is the basic protection you have from this.
the best thing you can do is only download APK's from certain sites you have used before. general red flag with installing downloaded APK's is no icon when you install them, a very different name of the file you downloaded then expected.
there is most likely no program that will allow you to download APK's and simultaniously keep you safe. they will most likely block the APK from being installed rather then check if they are safe.
also. many methods to provide paid Apps for free require some sort of maliciouis actions by the app to function properly, which makes them unsafe to begin with in the eyes of any any virus programs.
I resorted to using LuckyPatcher to modify apps myself instead of relying on external sources, in my opinion this work fine, and is relatively safe (used it for years now on multiple phones) and it does'nt require Rooting the phone.
Mind you that this is extremely illegal, you are pirating software. be aware of the laws in your country and the risk you are taking.
Kind regards,
Tobias