Magic has rules. It’s your job as the author of your story to know what those rules are. Consider for the moment, the different types of magic. Sympathetic magic requires you have a likeness of something to affect the thing that the likeness represents. Alchemy follows rules and the alchemist has books on what to combine to achieve a specific effect.
Sorcery, on the other hand, is magic by repetition, chanting the same phrase over and over again. Rituals also follow a specific pattern of words, movements, and actions to yield a result. And Thaumaturgy is observational magic. The wizard sees how something is done and then mimics it.
You can, of course, make up your own rules for all of these forms of magic or do a little research and base your rules on real beliefs. You can even make up new forms. For example, perhaps magic requires a rhyme or a little song and dance. Or perhaps it is sacrificial requiring something be destroyed.
Often knowing the true name of a thing lets a wizard control that object. When combined with sorcery, you might be able to summon something by chanting its name repeatedly. And some forms of magic, say necromancy, are probably banned by most ethical wizards.
You are also going to need rules for when a wizard can use magic. Wizards aren’t above the law. So they can’t cast fireballs and lightning bolts causing property damage unless they want to be hunted for destruction of property. They can, of course, defend themselves. Other uses are probably in a gray area, say reading someone else’s thoughts. Are there laws about this? That’s up to you to decide.
Finally, you need to decide whether magic requires the use of an external item, like a wand, or whether words and gestures are enough. Alchemy requires physical components like lead or sulphur, by other forms may not. Again you’ll need to decide what works for you.
Above all have fun with it and look for new ways of doing magic. This will keep your story fresh and engage the reader.