macOS Recovery installs different versions of macOS, depending on the key combination you use. If your Mac is using a firmware password, you're prompted to enter the password.
Or use Option-Command-R or Shift-Option-Command-R to start up from macOS Recovery over the internet.
Keep holding until the described behavior occurs.
To use any of these key combinations, press and hold the keys immediately after pressing the power button to turn on your Mac, or after your Mac begins to restart.