You can connect additional, external displays with an iMac or a Macbook. The only thing you need is the right adapter, depending on whether you have a USB C or Thunderbolt port, and an external monitor. macOS has reasonably good multi-monitor support though you still cannot get the Dock to appear on all your displays and stretching wallpapers across monitors is a bit tricky. What you can do is select a primary display on macOS.
Primary display on macOS
The first thing you have to do is connect your second monitor to your Mac. Once it’s connected, your desktop should automatically be extended. The second display will show you a somewhat faded out menu bar to indicate that it is not the active display at the moment meaning your cursor is on the other display.
Open the System Preferences and go to Displays.
With a second display connected, you will see a tab called Arrangement. This is where you can change the order of the displays i.e. which display appears on the right, and which appears on the left. You should set it up so that it matches the physical layout of the displays.
You will notice that one of the displays has a white bar at the top. This white bar indicates which display is the primary display on macOS.
To change the primary display, click and drag this white bar and drop it on to the display that you want to set as the primary display. Once you release the white bar, the primary display will be reset to the one you selected.
The process is deceptively simple; you’d never guess that the white bar is an interactive control but once you do, it’s easy to change the primary display. The Dock will jump to the display that you’ve just set as the primary display and if you have different apps/windows open on different displays, they too will jump to their ‘assigned’ displays. It may be a bit confusing when you first make the change so make use of the ‘Gather Windows’ button, to sort everything out.
When you select a display in the Arrangement tab, a red border appears around the screen of the one you’ve selected. This is how you identify which display is which. Use this information to not just arrangement the displays but also to set your primary display.
macOS will remember which display you set as your primary display. If you disconnect your external display, and then connect it again later, macOS will automatically set the primary display to the one you set manually.