All fantasy worlds have certain things in common. Wizards, witches, and magic are defining factors of the genre, but the systems of sorcery that power worlds of wonder often differ from one another. The magic of Dungeons and Dragons, for instance, is designed to balance player enjoyment and game mechanics, while the magic of Harry Potter is far less constrained and can bend to whatever the plot requires.
Source:https://www.cbr.com/dd-spells-harry-potter-tv-series-should-use/