If you read the javadocs (https://jd.papermc.io/paper/1.21.5/org/bukkit/event/entity/EntitySpellCastEvent.html) for the event, you can see what it does.
Spellcasters, if you click into them, are Evokers and Illusioners, which are entities that can cast spells. You can find more about them, and...