Why would I have corrosion on engine wires in 2015 Hyundai Elantra
My car was stalling or when trying to pass another car, the revolutions would
increase but the car would not go faster and in some cases stall.
A tune up may help your situation (that includes replacing plug wires), but you may have other mechanical issues causing your loss of power and stalling, recommend you get it to a mechanic asap.
Moisture will cause corrosion. If the corroded wires are at the battery it is from battery acid.