JSFiddle - React, Tailwind, and code Playground

HTML

<div class="layout">
  <header>header</header>
  <main>
    <div class="container">
      <div class="yet-one-wrapper">
        <div class="i-need-stretch">
          Меня нужно расстянуть на 100% высоты main.
        </div>
      </div>
    </div>
  </main>
  <footer>footer &copy;</footer>
</div>

CSS

body {
  margin: 0;
}

.layout {
  //display: flex;
  //flex-direction: column;
  min-height: 100vh;
  
  display: grid;
  grid-template-rows: min-content 1fr min-content;
}

.layout main {
  flex-grow: 1;
  outline: 3px solid red;
  outline-offset: -3px;
}

.container {
  max-width: 80%;
  margin: auto;
  
  height: 100%;
  
  outline: 3px solid green;
  outline-offset: -3px;
}

.yet-one-wrapper {
   height: 100%;
  
  outline: 3px solid orange;
  outline-offset: -3px;
}

.i-need-stretch {
  display: flex;
  align-items: center;
  justify-content: center;
  //border: 1px  solid;
  
  height: 100%;
  background: #bbb;
}