Pixels, percentages, and physical units
Pixels specify the digital width and height directly. Percentages scale relative to the source. Centimeters, millimeters, and inches need a DPI value to calculate pixels. The physical-size tools use DPI for that calculation; they do not embed the selected print resolution in the downloaded file.
Fit the picture without an accidental distortion
When the source and output have different proportions, contain keeps the entire picture with space around it, cover fills the rectangle by cropping edges, and stretch changes proportions. Use a deliberate crop first when the subject needs a position that a centered fit cannot choose for you.
Check both dimensions and bytes
A correctly sized image can still exceed an upload limit. Conversely, an image under the byte cap can have too few pixels. If your destination specifies both, inspect the final exported file after every operation. The dimension-first KB presets can downscale further to approach their target.