There are many tools and methods to generate favicons for your website, but the best tool I’ve found so far is RealFaviconGenerator.
Simply go to the website and click on the “Select your Favicon image” button, and upload a 260x260 image of any format (just make sure it’s not pixelated).
The generator will then generate different versions of your favicon for various platforms.
When done, you can download all your favicons in a zip file. You’ll usually want to put those files at the root of your project, but that depends on your setup. In my case, I added them to static/favicons
(I use Next.js).
You’ll also be given a block of HTML markup to insert in the <head
of your website to import your favicons.