In the following line:
localStorage.setItem('notes', JSON.stringify(nextNotes));
where does the value for nextNotes come from? When you call the addItem function, you do not pass any argument for nextNotes.
You push the new note to the notes array but you store nextNotes in the local storage afterwards.
Don't you mean:
localStorage.setItem('notes', JSON.stringify(notes));