Solving the error in code
There were some typos in your code
- Onclickevent listener should be in simple letters as- onclick
 
- Since the function is name is defined as  - savein JavaScript you can use- onclick="save()"in HTML
 
- If you get the value of - textareaoutside the function in the beginning of the script, only the initial value of- textareawill be assigned to- heikuvariable. To get the value of- textareaonce the user clicks on the button you should move
 - let heiku = document.getElementById("heiku").value;into the- savefunction.
 
Corrected code will look like below...
<div>
    <div>
        <h2>You are to write your tought here in this test box and click save</h2>
        <label for="heiku" class="label">Your Heiku</label>
        <br />
        <textarea class="textarea" id="heiku" name="heiku" rows="4" cols="50">
            Write your Heiku here
        </textarea>
        <button class="button" id="submit" onclick="save()">Save</button>
        <p class="p" id="heiku_input"></p>
    </div>
</div>
<script>
    function save(){
        let heiku = document.getElementById("heiku").value;
        let heiku_input = heiku
        document.getElementById("heiku_input").innerText = heiku_input;
        console.log(heiku_input);
    }
</script>
 
 
Achieving the desired result
- However the above code might not produce the accurate results you were looking for. The initial text inserted into the - textareatag in HTML is also counted as it's value by default. To display the initial text you have inserted inside the- textareato work as a placeholder you can include it in- placeholderattribute.
 
- Also I am not sure why you are once assigning the value of - textareato variable- heikuand then again assigning- heikuto- heiku_input.
If you prefer to perform more actions with the value of- textareayou can simply assign the value of- textareato- heikuonly.
 
- To make your code more into ES6 standards you can use - constto define the- savefunction and use- constinstead of- letto assign the value of- textareafield to- heiku_input. Read more about the usage here.
 
Here is the preferable snippet to use.
<div>
  <div>
    <h2>You are to write your tought here in this test box and click save</h2>
    <label for="heiku" class="label">Your Heiku</label>
    <br />
    <textarea class="textarea" id="heiku" name="heiku" rows="4" cols="50" placeholder="Write your Heiku here"></textarea>
    <button class="button" id="submit" onclick="save()">Save</button>
    <p class="p" id="heiku_input"></p>
  </div>
</div>
<script>
  const save = () => {
    const heiku = document.getElementById("heiku").value;
    document.getElementById("heiku_input").innerText = heiku;
    console.log(heiku);
  }
</script>