Resizing versus compressing
Resizing changes how many pixels an image contains. Compression keeps the pixel dimensions and reduces the file size by storing those pixels more efficiently. The distinction matters because resizing is usually the bigger win: a 4000 × 3000 photo holds twelve million pixels, and a layout slot 800 pixels wide can only ever show a fraction of them. The rest is weight your visitors download for nothing.
The practical order is resize first, then compress. Scale to the largest size the image will genuinely be displayed at, then apply compression to reach a target file size. Pixels you have already removed cost nothing to compress, so the two steps together reach a far smaller file than either one alone.