To set up a firmware password, restart your Mac and hold Command-R to enter macOS Recovery. Choose Utilities > Firmware Password Utility, then follow the instructions to enable a firmware password.