An option was written after the input files, and on macOS bwa counts it as extra input instead of an option
bwa mem reads its options with the system getopt. GNU getopt, on Linux, reorders argv, so an option written after the positional arguments is still picked up. BSD getopt, which is what macOS uses, stops at the first non-option argument, so everything after it counts as input. bwa mem ref.fa r1.fq r2.fq -t 4 therefore arrives with five positional arguments, and the check in fastmap.c rejects anything over three: if (optind + 1 >= argc || optind + 3 < argc) prints the usage and returns 1. There is no error line to go looking for. bwa never opened the index. The identical command works on Linux, which is why a pipeline that hardcodes this ordering only fails for Mac users.
Put the options before the files: bwa mem -t 4 ref.fa r1.fq r2.fq. If the ordering is baked into a pipeline (AMR++ does this in modules/Alignment/bwa.nf), either edit that line or run the pipeline in its Docker or Singularity container, where the Linux userland makes the ordering stop mattering.