On FreeBSD, `pkg provides` is a superpower! Once installed you can use it to tell you which package provides the file you're missing.
E.g. I was having problems exporting from orgmode to PDF via LaTeX; the error was that I was missing the file `cm-super-t1.enc`.
~ $ pkg provides cm-super-t1.enc
Name : tex-dvipsk-20250308
Comment : Convert a TeX DVI file to PostScript
Repo : FreeBSD
Filename: usr/local/share/texmf-dist/fonts/enc/dvips/cm-super/cm-super-t1.enc