How much coursework did you do in electronics engineering? Did you get a minor or some other recognition of that coursework? The situation is very different if you did one or two introductory courses and then changed your major than if you were in the electronics engineering program through the end of your junior year and ended up with a minor.
If you got a minor or some other formal recognition of the coursework, you can certainly list that. Assuming you didn't end up with some formal recognition of the coursework-- you didn't get a minor or a concentration or a certificate-- you can always list the classes you took as additional coursework. Something like
University of South StackExchangia 2015 - 2019
Bachelor of Science in IT
Additional coursework: electronics engineering I, diodes and things III, and googling 101
Whether it makes sense to do so will depend on how far you got in the program-- it's obviously much more useful if you're listing upper-level classes rather than introductory classes. As you get more professional experience, that's also the sort of information that you'd remove relatively quickly from your resume to save space for details of that professional experience.