Emacs can handle JPEG XL files as long as you build it with ImageMagick enabled and ImageMagick is built with JPEG XL support.
You can try evaluating (imagemagick-types) to see if it's enabled. If it fails with "void-function" that means that your Emacs was not built with ImageMagick enabled. If it returns a list of file types but the list doesn't contain "JXL" then your libMagick might be too old or not compiled with JPEG XL support.