Prevent a Mac laptop from turning on when opening its lid or connecting to power - Apple Support
A Mac laptop with Apple silicon automatically turns on and starts up when you open its lid or connect it to power. You can change this behavior without affecting your ability to turn on your Mac using its keyboard or trackpad.
Apple Support