Two display resolutions, two keys. A small menu bar app for the one thing most people install SwitchResX to do.
Download for macOS| Switch to Resolution 1 | F14 |
| Switch to Resolution 2 | F15 |
Shortcuts act on whichever display the pointer is on, so with a laptop next to a monitor you change the screen you're looking at. Resolutions are remembered per display and filed under the monitor's vendor, model and serial — a monitor keeps its pair when it comes back on a different port.
The menu bar item lists every mode each connected display will run, for the times neither bound resolution is what you want.
F14 and F15 are unclaimed on every Mac keyboard, which is why they're the defaults — but macOS sends the media meaning of the top row unless you turn on System Settings › Keyboard › Use F1, F2, etc. keys as standard function keys, or hold fn. Any other combination works too: click the shortcut field in Settings and press what you want.