Brilliant. Removing the offending library path (LDFLAGS="$LDFLAGS -L/usr/local/opt/postgresql@15/lib") and reconfiguring worked beautifully.
Incidentally there were a bunch of brewed paths I had removed in debugging (most of which contained the @). Postrges was actually the only remaining one, I hadn't removed. Thank you both (and Chris) very much. Really excited to finally start interacting with the language! Mike