This is super simple in WordPress since they’ve added this as a standard option for any theme.
As of May 2019, Google now actually includes the icon next to search results if you have one, and can improve your SEO standing, so it’s important to take this little step.
In WordPress, click Appearance > Customize.
On the next screen, click continue.
Then, click “Site Identity”.
Finally, you’ll see an upload area to upload your site icon image.
WordPress requires the image be square with dimensions of 512 x 512px.
Your new icon will show up in browser tabs, and in google mobile searches.