One of the primary tenets of a good magic system is the existence of some sort of cost for that magic being used. There are numerous ways to do this, and I can’t list all of them here, but here are some main ways of doing this:
Finite resources: In this case, a character has a set amount of magic they can access, and there simply is no more magic that they can use. Generally in these cases magic is renewable and can be recharged through ritual, rest, or even just time. It can be written so a person can increase their magic reserves through practice, in the same way that a person can get more muscle, but you don’t have to go down that route.
Exhaustion/toll on the body: In this case, a person doesn’t necessarily have a finite amount of magic that they can theoretically use, but using magic draws from their own physical resources. This is often down in the form of exhausting a person, but you can also have it take any other sort of toll on a person’s body. This can also be done in conjunction with the finite resources, as with chakra in Naruto, where a person has x amount of chakra and the more they use, the more exhausted they get. You can either have automatic shut-off points (a person will pass out before they use enough to kill them) or make it so characters have to make sure they don’t actually kill themselves using too much magic.
Requires sacrifice: In this case, an internal or external sacrifice is required to do magic, or to do powerful magic. This is often used in ritual magic, in part because sacrifices generally take time, but if you can figure out how to make a sacrifice part of an immediate magic system, that can work to. A sacrifice in this case can be blood, a memory, a life, or whatever else you want to make it.
Requires outside object: In this case, the person has to have/be using some sort of outside object (a wand, a staff, an amulet, etc.) to do magic. This is more of a restriction than a cost, but you can have the object be limited-use only, where either the magic needs to be renewed after a certain amount of use or it’s burned through entirely.
Toll on the environment: In this case, the magic doesn’t pull from the person itself but from the environment amount them, taking a toll on that environment as it does. That toll can be pulling literal energy out of the air (making it colder), it can be killing plant- or animal-life around the person, it can be any number of things.
Opens one up to other things: In this case, magic opens one up to outside influences (the dark side, the forces of evil, etc.). I’ve seen it does as making a person more open to mental illness, but that’s something you want to be really careful about, especially if you don’t have a mental illness yourself. This one in particular can be tricky, but there are ways to make it work.
There are many other forms of costs for magic, and you don’t need to use any of these if they don’t work for your story, but they’re a jumping-off point to work from.