Thats because the image source is png and not svg, you can google mozzilla logo svg and copy the source link and then make the alterations in ur code. mozilla logo svg
For this, i dont know how to fix it, maybe it isn’t needed because nowdays rarely someone is using a screen smaller than 340px, that is the size when the logo starts overflowing the h1