Guide
Most people's mental model of "compressing an image" is a single dial: turn it down, file gets smaller, image gets worse. That's roughly true, but it hides the more useful part of the picture.
Lossless compression (PNG) finds more efficient ways to store the exact same pixel data — nothing is discarded, so you can always reconstruct the original perfectly. It works well for images with large flat areas of color (graphics, screenshots, text) and poorly for detailed photos, which is why photographic PNGs tend to be large.
Lossy compression (JPG, WebP) actually throws away information — specifically, the kind of fine detail and color variation human eyes are least sensitive to. Done well, you can discard a surprising amount before anyone notices; done poorly (or pushed too far), you get the blocky, smeared look everyone recognizes as "an over-compressed JPG."
A quality setting of, say, 70% doesn't mean anything on its own — the same setting produces wildly different file sizes depending on the image's actual content (a plain sky compresses far more than a busy, detailed scene at the same "quality" number). That's exactly why picking a single quality percentage and hoping is unreliable.
The more useful approach flips the question around: instead of "what quality?", ask "what's the highest quality that still fits under my size limit?" and let the software search for it — trying different quality levels until it finds the best one that fits, which is what a target-size tool does automatically.
There's a floor to how small quality adjustment alone can go before an image becomes genuinely unusable. Past that floor, the only way to hit a very small target is to also reduce the pixel dimensions — fewer pixels is a legitimate, different kind of size reduction, not a failure of the compression itself.
Understanding this is really just understanding why telling a tool your target size, rather than guessing a quality number, produces a better result with less trial and error — it's not a trick, it's just doing the search that you'd otherwise have to do manually, one guess at a time.