Changing an image in header.php

Yes it is. You have 2 choices:

Option 1

Use an FTP manager such as FileZilla, and navigate to the following folder:

\wp-content\themes\YOUR-THEME'S-NAME\images\ and replace the logo.png file with any image you desire. To preserve the appearance, use an image with the same size of your current logo.

Option 2

Upload your logo through media library, and then replace the link to your logo with the link of the image you’ve just uploaded. Head over to Appearance > Editor and update your theme’s header.php to something like:

<a href="https://wordpress.stackexchange.com/questions/256295/<?php echo home_url("https://wordpress.stackexchange.com/" ); ?>" class="logo"><img src="YOUR IMAGE URL HERE" width="270" height="90" alt="Logo"></a>

Replacing the YOUR IMAGE URL HERE with your newly updated logo, of course.