To enable or disable the firmware password on the Mac and MacBooks, you must press the Command+R keys or the Option(Alt) key after turning on the sound, then select the menu “Utilities“-“Firmware password utility “and select” Enable firmware password “in the window that opens and set the password.
In the future, to start the computer from another drive, restore or reinstall the system, you will need to enter the firmware password.
If you do not remember or do not know, then you need to contact Apple Authorized Service Centers (locate.apple.com) with the original receipt or purchase invoice.