How can I create Text Boxes based on a user's input?

I am trying to make a linear regression basic app, so I can provide the variables for the user. The problem is, that the app that I made only calculates if the user already have the sum of the least squares of the samples, like in the image.

I want to make an app that already calculates the sum for the user. And based on the amount of samples, it creates text boxes, so the user can write each sample, and the app calculates everything itself. Could anyone help me out?

Maybe you haven't learned how to use lists yet, nor how to reuse components?

Also, study how this sample app requests input with almost no text boxes for an arbitrarily long list of inputs: