Help yourself, my brother.
let textarea = document.querySelector("#txtar");
let botao = document.querySelector("#botao");
botao.onclick = function() {
console.log(textarea.value);
}
<textarea id="txtar">Texto digitado dentro do textarea</textarea>
<br>
<button id="botao">Exibir Texto</button>
What you type in the textarea is the value (value) of your field. So when you display the "textarea.value", you are displaying what you typed in the textarea (the value that your textarea now has is what you typed in).
You type in the textarea field and capture its value is the same as if you leave the textarea thus:
<textarea>Texto dentro do textarea e que é o seu value</textarea>
If you capture the value of that textarea above and display it, what will be displayed is the text that is within the textarea.
Note the example I put in the answer that if you just click the first button, the text (which becomes the value) already in the textarea will be displayed. Now if you delete that text and type something else, it will display what you typed (the new value).
You can explain better what you want to happen and what’s happening?
– Sergio