Is the OP's install missing a bunch of MIME entries or something? I can't reproduce the examples given for xdg-mime on Fedora 34, e.g.
$ xdg-mime query filetype file.docx
application/vnd.openxmlformats-officedocument.wordprocessingml.document
$ xdg-mime query filetype file.xls
application/vnd.ms-excel