The combination of water with high mineral content (hardness) and high nitrate concentration seem to promote HIH infections rates in soft, to neutral water parameter species like oscars.
In nature the concentration of nitrate is usually undetectable, because of constant rains, riverine flow rates, and the way surrounding terrestrial plants constantly consume nitrate.

If your water is at all hard, you may need to double or triple your nornal water change routine, to hold nitrate to below 5 ppm to prevent HIH infections.
I try to do at least 100% water changes per week, by changing 40% every other day, and using a heavily planted sump as filtration to hold nitrate in my tanks, to natural levels.

Below is the sump, used to consume nitrate between water changes,

Anti bacterial Medications sometimes work temporarily, but unless nitrate is significantly reduced HIH just reinfects.