One Apple thunderbolt display -> multiple Macs and a Windows laptop?

Hi all - a family member has an iMac and an additional Apple Studio display, which as we know has a single thunderbolt input that is supposed to come from a Mac, as well as some USB-C ports.

There’s now a Windows laptop with USB-C outputs that needs to connect to this display for work. Also a newer MBP that could also benefit.

I gather connecting the Windows laptop to the thunderbolt port will allow the Studiio Display to work as a display and will also power the laptop. However pulling the cable from the back of the iMac is not convenient. As a worst case I’m thinking a USB-C extension cable could at least provide a more convenient place to break the connection to the iMac and plug into one of the other laptops instead. Is there a switch that could switch the displays?