I don´t understand why horizontally everthing seems perfect but vertically as you can see in the image, there´s no margin. If this worked for the grid to take the whole width:
 grid-template-columns: repeat(3, 30%);
Why this didn´t work for taking the whole height?:
grid-template-rows: repeat(3, 30%);
This is the code: The .box is the container and the .card are the childs:
.box{
  /*
    margin: 20vh auto;
    text-align: center;
    width: 75%;
    max-width: 650px;
    height: 60vh;
*/
    display: grid;
    grid-template-columns: repeat(3, 30%);
    grid-template-rows: repeat(3, 30%);
    grid-gap: 12px;
    justify-content: center;
}
.card{
    border: 2px solid gray;
    height: 100%;
    border-radius: 6px;
}<div className="box">
            <Card />
            <Card />
            <Card />
            <Card />
            <Card />
            <Card />
            <Card />
            <Card />
            <Card />
        </div>
 
     
    