Array gets the same value as an element from input

I would like to make an input (later function that adds more)

Then while user write some kind of number, the array gets it as an element instantly.

When I have 5 inputs with numbers, the array also has that 5 values in order ofc and that all like automatically added.

How can I do it?

I found really good video on YouTube but its’s React and I am only interested in JavaScript.