You have done the most of it, just that you haven’t realized it yet. If you are using a child theme then you can copy and paste the header.php from the main theme into the child theme folder and make the exact same changes you have made now to keep the icon above the logo.
Now the header.php in child theme will load instead of the main theme’s.
In doing so the changes remain preserved even if the main theme is upgraded/updated.
Files inside the child theme remain preserved on parent theme update
Another way is to find suitable hooks from the header.php file and code it in the child theme’s functions.php file.
Hope it helps!