A marketplace wants 1000 × 1000. A form wants a 35 × 45 millimetre photo. A template wants a 1920 pixel banner. Typing those numbers into a resizer is easy; the trouble starts when the shape they ask for is not the shape of your picture.
Two operations are involved and confusing them is what produces stretched faces: resizing changes how big the picture is, cropping changes which part of it you keep.
If the target ratio matches your photo's, just resize: a 4000 × 3000 photo scales cleanly to 800 × 600, because both are 4:3.
If it does not, resizing alone squashes the image. Crop to the target ratio first — a square crop for a square requirement — and then resize the crop to the exact pixel numbers. That order keeps everything in proportion and lets you choose what stays in frame.
Enlarging cannot add detail that was never captured; the result looks soft, and sharpening afterwards mostly adds noise. If a form demands more pixels than your photo has, reshoot it or use a higher-resolution original.
An AI upscaler is the exception. It invents plausible detail rather than recovering real detail, which is fine for a photo on a page and wrong for anything where the fine detail is the point, like a document or a serial number.
Official forms often specify physical size and a resolution: 35 × 45 mm at 300 dpi. Convert before resizing — millimetres ÷ 25.4 × dpi gives pixels, so that example is about 413 × 531 pixels.
DPI written into a file is only metadata; what a printer actually has to work with is the pixel count. Get the pixels right and the DPI follows.
Forms usually impose both a pixel requirement and a maximum file size, and meeting one can break the other. Resize first to the exact dimensions, then compress if the file is still too heavy — never the other way around, since resizing after compression wastes the quality you paid for.