You usually need a passport or visa photo in a hurry, and a trip to a photo studio for a few tiny prints takes time. A selfie in front of your wallpaper won't be accepted anywhere. The passport photo maker turns a regular photo into a neat document photo in the size you need.
Upload a photo where you look straight at the camera, without glasses or a hat. Pick the size: 2×2 in for a US passport or visa and for India; 35×45 mm for passports in the UK and EU and for Schengen visas; 30×40 mm for documents and passes; 33×48 mm for a China visa; 50×70 mm for a Canadian passport. Choose a white, light grey or light blue background. Keep your own clothes or switch to formal ones: a dark jacket over a plain light shirt or blouse.
Google's Nano Banana 2 straightens your head, sets a plain shadowless background and soft frontal light, and doesn't retouch your face: moles, skin texture and skin tone stay yours. You get two files: the photo cut to the exact size in millimeters at 600 dpi, and a 10×15 cm (4×6 in) sheet with several copies and cut lines that prints like a regular photo. The head's share of the frame is approximate, so check the photo against the authority's requirements before you apply: some offices take the photo themselves.