Some people try to spin this as a Google vs open standards, while it's mostly a Google devs vs. some other Google devs situation:
If you look at https://github.com/libjxl/libjxl/graphs/contributors, ~everybody except Jon Sneyers is a Google employee (I think the AVIF ratio is similar, but I didn't check).
So the question isn't about which format is better, but who won internal politics and it's clearly the AVIF folks - for reasons which aren't really possible to tell from the outside.
Is there a published, freely available specification for JPEG-XL yet? The W3C publishes JPEG and PNG specifications, and AVIF can be found on the AOM website. One big issue with JPEG-XL is that the specification is closed. The old drafts I have found were extremely poor. I have heard that the actual spec is apparently better, but I cannot find a copy of it myself.