Best way to do this? magic/skill learning (MZ)

So in my game my concept is that there are two worlds and magic only exists in one, so my party learns their first spell by an event once they hit that world- easy enough but for the future spells is there a way to say Class learns a spell at level 20 IF event has happened? Because I can just put it behind a level but that means its possible for someone to grind a stupid amount and learn magic before they should , and that bothers me.

my other thought is to have two near identical classes for each person (one with magic one without) and have then transition once they discover magic...

Just seeing if there's a good but easy way to do this? I'm still very new and there might be a simpler way?
That might be possible by using a conditional branch eg If {enter switch name here} is on then within that branch you could use change skill add whatever the spell name is. This would probably work if your characters learn spells via eventing, I'm relativity new at the program too so there might be an even better way to do it that I'm not thinking about

Original thread: https://forums.rpgmakerweb.com/threads/best-way-to-do-this-magic-skill-learning-mz.152660/