The old JPG/PNG choice had a big problem: JPG handles sharp edges, including text, badly. PNG produces huge photo files. Images containing a mix of both don't work well in either format.
By contrast, when using a modern format like WEBP or AVIF, a single encoder configuration produces decent looking results across a variety of input images.
How is it "a single encoder configuration"? WEBP has separate lossy and lossless compression modes and simply gives both the same filename extension.