Adding a favicon in the new WordPress block themes is done by going to Appearance > Editor.
Next up you go to any template or template part, such as Header in this example.
After that select the “Site Logo” block and add it anywhere (You will be deleting it later).
Click the Site Logo block and click Add Media.
Choose the image you want as a favicon and add the image to the Site Logo block.
Select Use as site icon and click Save.
The image has now been set to favicon. You can now delete the block again.
After deleting the block, you’re done, the image will continue to be your favicon even though the block has been deleted.