.nav {
display: flex;
align-items: center;
background-color: #eee;
}
.logo {
background-image: url("https://picsum.photos/200");
width: 200px;
height: 200px;
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
h1 {
margin-left: 10px;
}
<div class="nav">
<div class="logo"></div>
<h1>
Test
</h1>
</div>