A favicon is a small 16×16 pixel icon that serves as branding for your website. Its main purpose is to help visitors locate your page easier when they have multiple tabs open. Due to their tiny size, favicons work best as simple images or one-to-three characters of text.
Setting a favicon is a simple task, and it can be done directly from the Magento Admin section. To do so, head into Admin -> Content -> Design -> Configuration and click Edit on the Store-View (or Global) you want to set the favicon for:
Expand the HTML Head section and upload your favicon using the uploader under Favicon Icon:
After uploading your favicon, save the configuration and flush the Magento Cache from the Cache Management section of the Magento Admin. Reload the frontend and the favicon should be applied.