What each measurement means
Resolution is the pixel count: width multiplied by height, usually written as 1920 by 1080. A related figure, PPI, describes how tightly those pixels sit when the image is printed, but the file on screen simply carries the pixel dimensions and nothing more.
File size is the amount of data stored in the file, measured in KB or MB. It depends on pixel count, color detail, and how aggressively the format packs the data. Two images with identical dimensions can still differ greatly in size.
How they affect each other
More pixels usually mean more bytes, so lowering resolution reliably shrinks a file. That is why resizing is the fastest path to a small image when an upload rejects a heavy photo for its pixel count.
Compression works in the other direction. Re-encoding an image at a lower quality setting cuts file size while leaving the pixel dimensions untouched, so the picture keeps its width and height but occupies fewer bytes. Neither approach is free: resizing removes detail you cannot recover, and heavy compression adds artifacts.
Which one to change
If a form rejects an image for being too large in KB, compress first; the dimensions stay useful and the file drops below the limit. If the file is rejected for having too many pixels, or the display area is smaller than the image, resize instead.
Plenty of upload rules involve both at once, such as a cap on file size and a cap on pixels per side. Work down in order: resize to the size you actually need, then compress to hit the byte limit. That sequence wastes the least visible quality.