Problem with favicon in the latest wp

There is basic Favicon functionality built into WP. Go to Theme Customiser > Site Identity and use the ‘Site Icon’.

In some cases its better to have custom code in the head, and the above doesn’t work for non WP pages within the site, if thats what you are using. However its worth a try if you hadn’t already.

In the past I have also used a website that generates real favicon code for the head, including a variety of sizes and allows you control the look of favicons on smartphones etc. So going with a more detailed setup in the head may also be worth exploring?