This video shows how to switch an external monitor cloning and extension settings in Windows 10 and Windows 11.

Windows 11 has a very convenient feature where it remembers the actual position of the open apps across displays, so that they can be restored as soon as the external monitor is plugged back in.

Monitor featured in the video Innocn 27C1U: