Im stuck. Trying to save some data from a model, but can figure out the correct workflow

Im trying to build a simple “add” button, so I can add topics to different subject.

But I cannot understand the correct, or the best, approach on how to show the “create new” modal component for adding a topic.

Have a look at the StackBlitz fiddle, Vue (forked) - StackBlitz

Several errors and probably bad coding practices.

My question is, how can I save a new topic to the correct subject with a component? Because components are the way to go right?