First of all, Welcome to Ren'py
Do you have experience with some other programming languages or is this the first time you dive into something like this?
If this is the first time you are gonna try and program something then I would highly suggest you to learn the basics and build your knowledge step by step. DDLC uses some rather advanced coding, and I don't think it might be a good idea to try something so big if you don't have proper basic skills (otherwise it might be a little too hard or at least seem overwhelming).
Anyway, answering your question, I don't know the exact way THEY did it, but if I were to do something like that I would try making a screen for the minigame (obviously), a list of words, pick some words randomly from that list, show them as text buttons, define a function so when I choose a word that relates to every character makes that character's sprite to jump and add +1 to a score, then check the maximum value among every character's score and based on that chose the outcome dialogue during the next "day".
...and probably I am missing something.
As you can see, it is not a simple task, so I strongly encourage you to learn more about Ren'py and start coding little by little, "Learn to walk before trying to fly", and eventually you will be able to come to solutions to this questions by yourself. It's not gonna be easy, but it will worth it.
Have a nice day