On Intel-based Macs, press ⌘R during early boot (before the startup chime) to enter recovery mode.
On Apple Silicon-based Macs, press and hold the power button until you see "Loading startup options" appear below the Apple logo.
Mounting the root volume read/write
Under normal operation the root volume is mounted in a read-only state, preventing tampering. It is mounted read/write in recovery mode, below