What’s remarkable is, like MP3, JPEG is a perceptual format designed decades ago but still so widely used today. We’ve actually gotten much, much better at image and audio compression in the intervening years, but both JPEG and MP3 hang on because they’re “good enough” for the majority of uses.
I do hope that new alternatives like BPG, HEIC or WebP displace JPEG someday - but that day promises to be very far into the future.
Webp is royalty free, but for lossy compression it's not a good enough improvement (imo) over jpeg for it to replace it. For lossless compression though, it beats PNG both in size and compression/decompression speed by a good margin.
As for potential jpeg replacements, we have AVIF which is like BGP,HEIF but with the royalty free AV1 codec: https://aomediacodec.github.io/av1-avif/
And the other one I find very interesting is PIK, which is a new lossy/lossless codec that is supposedly a good improvement over jpeg while being very fast, and also has the feature of being able to losslessly recompress jpeg images into pik with ~20% compression: https://github.com/google/pik