AVIF supports "8-, 10-, and 12-bit color depths". It does not support 16-bit color depths (which is my claim made in the comment above). See https://en.wikipedia.org/wiki/AVIF
The need for 16-bit colors arises when HDR content is edited, but unnecessary for just playback. AVIF is a playback format, so they didn't feel the need to support 16-bit colors, I guess.
I think a bigger issue is that it apparently doesn't support images exceeding just 9 megapixels, making it unsuitable even for digital photography today. There is a technique of stitching multiple images together, but I'm not sure what other drawbacks this has.
Another problem is that it doesn't support progressive loading in the browser. Meaning the AVIF image only shows when it is fully loaded:
That looks really bad for the web and could make AVIF subjectively slower than most other image formats.
It's disappointing. There is a once-in-multiple-decades chance to establish a big new image format -- and then it doesn't even support some basic features JPEG had decades ago. If AVIF wins, we probably would have to live with its problems for ages. It reminds of JPEG not supporting an alpha channel. 30 years later this blunder still causes headaches.
So yeah, AVIF seems to have better compression than JPEG XL, if the subjective examples are reliable, but at least the latter doesn't miss basic features, which seems more important in the long run. Alas, Google/Chrome favors AVIF, so JPEG XL seems doomed.
Edit: According to this table, AVIF does in fact support HDR:
https://jpegxl.info/