Ever since 2016 when you open the lid of your Apple laptop whether it’s an Apple MacBook Air or MacBook Pro it will automatically turn on and boot into macOS.
If for whatever reason you need to disable it you can open terminal from Applications > Utilities folder and type the following command to disable it:
sudo nvram AutoBoot=%00
If you need to enable the Auto Boot all you need to do is to type the following command in terminal or reset the PRAM on your laptop:
sudo nvram AutoBoot=%03
To reset the PRAM all you need to do is to hold down the command+option+p+r while the computer is turned off and then press the power button to turn it on, keep holding the keys until the computer reboots and you see the Apple’s logo, then release the keys.