Other than the free floating algae they help eliminate, UV sterilizers kill bacteria that flow thru them, but only those that flow thru the light at a slow enough rate to damage their organelles.
They do "not" any bacteria on the fish itself, they do not any bacteria or protozoa on the substrate of other phages that live as sessile biofilm.
They are not a substitute for a quarantine tank, they also do not kill many protozoa with a hard enough cell wall, unless those protozoa spends serious amount of time in the kill zone under a strong enough light.
They do not kill beneficial bacteria (it is sessile)
If you do not regularly clean off the crud that can build up on the inside of the unit, the unit becomes ineffective.
And the bulbs themselves become ineffective after a while, because they loose kill power, so must be regularly changed..