Along with setting up Wifi on your headless Raspberry Pi, you should likely set up SSH as well else the whole thing is kind of pointless since you won’t be able to connect to it even though it’s on your network.
In order to enable SSH on the Raspberry Pi, you need to create the following empty file on the /boot partition of the SD card for your Raspberry Pi. I used the following command in Terminal on my MacBook Air.
Once you have done that you can place the SD card back into your Raspberry Pi, let it boot and you then should be able to SSH to it with the following default Raspberry Pi credentials
User: pi Password: raspberry