How to create and save a set of flashcards in CoreData?

Hello, everyone, I'm building flashcards app using SwiftUI and CoreData. Currently, I have reached a point where I can have a functional add view where user can enter term, definition and name for its set and save the data entered by pressing "save' button. After this, the user can see his data in the HomeView where I'm doing fetch request, however, I'm stuck at a point where how can I create a set of flashcards based on what user entered in the addView and store it in HomeView? Do you have any suggestions for implementation of this logic? thanx