When the monitor is connected, the dock should change its position
In System preferences -> Displays -> tab Arrangement, you can drag and drop the menu bar (white rectangle) to the desktop you want to be the master. System remembers that and everytime the same display model is connected it sets up automatically.



If you want to see the dock on the other screen, run the mouse pointer to the bottom of the screen and hold it there, the dock should move.