Jacob V. answered 12/23/21
Physics & Math Tutor
I agree with the earlier answer, but I have something to add:
Yes, matter outside of the event horizon can be charged, but the matter inside is still charged as well.
Strangely enough, magnetic and electric fields created by charged particles pass through black holes unaffected (sort of, I'm sure its more complicated than that), but the charge does not disappear when sucked inside a black hole, and it still affects stuff outside.
How is this possible? I don't know. But there are two types of black holes with charge, Reissner–Nordström black holes (without spin) and Kerr–Newman black holes (with spin). They are both predicted by Einstein's theory of general relativity.