I can already add new text field on the click of the button, however I need to collect the value of each added text field and save those into the database (mysql)
You can create an array to push each new word/ modified word into with something like this:
const words= [];
words.push("WORD");
See more at https://www.w3schools.com/jsref/jsref_push.asp
Now, regarding the MySQL part : you can not achieve access to a database from pure JavaScript on client side. You would need NodeJS in order to achieve access.