In your HTML, inside of your <head>
(after <title></title>
) you will need to use
<link rel= "icon" href="./Images/image name.png" type= "image/png" />
replace "image name" with your actual image name
here is the code that I have tested it with
<title>Dark Mode Toggle</title>
<link rel="icon" href="./Images/yorha crewpic.png" type="image/png" />
This works fine with me.