For the workflow, it seems obvious to me
1. Create an event in the Add button ...
Double-click the OK button to create a method automatically.
private void btnAceptar_Click(object sender, EventArgs e)
All code in this method will be executed each time you press the Add button. Here we will do the next point ...
2. Insert the TextBox value in the DataGridView ...
It would be nice if here (in the button method) you validate that the TextBox value is not empty, that it has no letters, etc.
Insert in the DataGridView a new row with the index, and the value that is in the TextBox as they indicated in another answer
Within this same method of the button you add the value of the TextBox to the bar graph