Set post to the value of the textarea element using .value.

<html>
<head><style>body {min-height: 300px;} input { font-size: 16px; } textarea { font-size: 16px; } </style></head>
<body>
<img id="profilePic" src="https://mimo.app/r/profile.png" height="45">
<textarea id="postText" rows="3" cols="18" placeholder="What's on your mind?"></textarea>
<br>
<button onclick="share()">Share</button>

  <script>function share() {
  var post = document.getElementById("postText").value;
  console.log(post);
}</script>
</body>
</html>]]>

Use .value to get the value of a textarea element.