Hi, I'm Rodrigo and I will help you.
The AI answer is correct, but in addition to this answer, the file must be in .ico format and works best when the image has a squared format.
You can use an online converter to convert your image file to a .ico file.
Here is a good free option for that:
https://convertico.com/
Standard Disclaimer: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.