Below is archive link which has reference on how to set up raspberry pi 3B+ in headless mode. It will will also help in setting up ssh and wifi if required.
To update the default password:
passwd
command to update the password or add your ssh public key to ~/.ssh/authorized_keys
folder.To add ssh keys for login: You can also your public keys for ssh, which give seamless way to login without password hassle, but then you need to have ssh keys to login.
mkdir ~/.ssh
authorized_keys
: touch authorized_keys
cat <pub_key> >> authorized_keys
Further reading: