Photos: JPG is often the simple choice
JPG uses lossy compression and typically works well for photos without transparency. A smaller JPG can look almost identical at normal display size, but excessive compression produces blocks and blurred fine details.
Always compare the compressed result with the original at the same zoom level. Text in screenshots often degrades faster than textures in photos.
Logos, screenshots and transparency: PNG
PNG is lossless for common 8-bit graphics and supports transparent backgrounds. It suits diagrams, logos, text-heavy screenshots and images where crisp edges are important.
A PNG of a photographic scene can be much larger than a JPEG or WebP. Do not promise that merely renaming a file extension changes its real format.
WebP and compatibility
WebP supports lossy and lossless compression and can preserve transparency. It is a useful web delivery option, but check compatibility with the software and recipients you use.
Converting a low-quality JPG to PNG cannot recreate missing detail; the PNG only preserves the already-compressed pixels.
A practical comparison
Take a 1600 × 900 photo and export it at two reasonable JPG quality settings, then compare text, edges and file size. For a logo with a transparent background, compare PNG and WebP exports and verify alpha transparency.
Keep the original file while experimenting. Resize dimensions before compression when a smaller display size is acceptable.