This is a good article to bookmark from Apple – I wasn’t aware that there were different keyboard shortcuts to boot into the macOS Recovery system, and which keyboard shortcut you use will (potentially) give you different versions of macOS installed on your drive.
The usual one is ⌘-R – this will boot into Recovery and install the latest version of maOS that you had installed on your Mac. I believe this means if you had, for example, High Sierra, but hadn’t upgraded it all the way to 10.13.6, you will get 10.13.6 installed, I don’t think it will install an earlier release of High Sierra for you.
Opt-⌘-R is the interesting one, as this will install the latest version of macOS that will work on your Mac. And Shift-Opt-⌘-R will install the version of macOS that your Mac originally shipped with, provided it’s still available from Apple.
To start up from macOS Recovery, turn on your Mac and immediately press and hold one of the following combinations on your keyboard. Command-R is generally recommended, especially if you never installed macOS Sierra 10.12.4 or later.
Command (⌘)-R – Install the latest macOS that was installed on your Mac.
Option-⌘-R – Upgrade to the latest macOS compatible with your Mac.
Shift-Option-⌘-R – Install the macOS that came with your Mac, or the closest version still available.