Don't you mean JPEG XL?
JPEG XL vs. AVIF for web use-cases
Jpeg-XL's key win was only lossless translation of existing jpeg to a modern format. Mostly for archives where you don't want a lossy translation.
In terms of picture quality for given size, AVIF has it solidly beat.
Agree, though I do miss the clarity of if an image is lossy or lossless just by extension. (Obviously a png could be produced from a heavily compressed jpg, but it is still a handy heuristic in my image pipelines)
I thought it was pretty well established that JXL has a big room for improvement when it comes to encoders. There are some fundamental limitations wrt the absolute lowest bitrates, but that the room for improvement in encoders is rather substantial, especially with things like rate-distortion search heuristics.
The comparison is more about who has had the most man-hours and megadollars put into encoders quality than about the inherent limitations about the format.
With that said, I use AVIF, but I do have what can be said to be an irrational preference for JXL.