let card = document.createElement('div')
card.classList.add('card')
card.innerHTML = `
<input type="text" placeholder="write word" class="card-word"></input>
<input type="text" placeholder="write translate" class="card-translate"></input>
<input type="text" class="card-info"></input>
`;
cards.insertBefore(card, addBtn);
it is necessary that when the user enters data, they are saved and stored, so that when the page is reloaded, they are saved
I also want to ask you for advice on how to do it better
You can hook onChange event with your dynamic elements like this
<input type="text" placeholder="write word" class="card-word"
value="localStorage.getItem(\'yournameforthisfield\')"
onchange="localStorage.setItem(\'yournameforthisfield\', this.value)"></input>
then on submit you can use localStorage.getItem to retrieve these field values.