Barbarians are among Dungeons & Dragons Fifth Edition's least magical classes. Their Rage precludes most spellcasting, and their base class features focus solely on physical prowess. The D&D 5e Path of Wild Magic barbarian subclass moderates this. It's still far from a spellcasting class, but its Rage generates magical effects.
Source:https://www.cbr.com/dnd-wild-magic-barbarian-build-guide/