The four properties that matter
A format is not a quality level. It is a set of allowed features plus a compression scheme, and picking badly costs you either bytes or capability.
Compression: lossy or lossless
Lossless formats guarantee exact pixels. Lossy formats trade detail for size and give you a quality setting to choose with. WebP and AVIF offer both modes, which is why "is WebP lossless?" has no single answer — the two promises differ and the file does not announce which one it used.
Alpha, animation, HDR
JPEG cannot store transparency at all, so any design that needs a cut-out must leave JPEG behind. Animation is a separate capability again: PNG has no animated form in the standard, GIF does but with a 256-colour palette, and both WebP and AVIF can animate. HDR and wide-gamut content need 10-bit or 12-bit support, which in practice means AVIF.
If you need alpha and small files, the choice is WebP or AVIF. If you need exact pixels and alpha, it is PNG or lossless WebP — JPEG is not on the list.