https://www.openbsd.org/faq/faq4.html#WifiOnly
typically fw_update will download missing firmware,
but can't download wifi firmware over wifi without the firmware for wifi.
this was the case while installing openbsd on my thinkpad x1 carbon 5, as i lack an ethernet adapter for it.
one way to determine what you might need is attempting to connect from the installer and getting an error, in my case:
...
IPv4 address for iwm0? (or 'autocnf' or 'non') [autoconf]
iwm0: could not read firmware iwm-8000C-36 (error 2)
iwm0: failed to load init firmware
from an existing openbsd installation, you can load the required firmware into the installation image itself:
$ vnconfig install75.img
vnd0
$ mount /dev/vnd0a /mnt
$ fw_update -Fv -p /mnt iwm
$ umount /mnt
$ vnconfig -u vnd0
since i didn't have one around,
i instead manually download the iwm-firmware-20230330.tgz package from http://firmware.openbsd.org/firmware/ and copied it onto a fat filesystem (read/writable by macos and openbsd) on a usb flash drive.
then manually install with fw_update (documented retroactively from memory, untested):
$ mount /dev/sd2i /mnt
$ cd /mnt
$ tar zxf iwm-firmware-20230330.tgz
$ fw_update /mnt/firmware