If you don't want to switch cables when you switch computers connected to the display, then you need a KVM switch. There exists a Thunderbolt 2 KVM switch, but the PC doesn't have Thunderbolt, so you'll want to use a DisplayPort KVM switch. The Moshi bidirectional USB-C to DP cable should work wth the new 24 inch LG UltraFine 4K display but if you want to use all the features of the display (brightness control, audio, USB ports), then you'll want a method that includes USB 2.0 (like Wacom Link Plus or VR 2 cable). The old 22 inch LG UltraFine 4K requires USB (or maybe the Alogic cable). With USB, your KVM switch should also include USB.
Page 4 | I have the new generation of the LG Ultrafine 4k for Mac, which eschews DisplayPort and HDMI inputs for just two (2) Thunderbolt 3 inputs. L...
egpu.io
For the PC, it may be possible to install the Boot Camp driver that allows brightness control of the LG display using the Boot Camp control panel (I haven't checked that - it works for the Apple Pro Display XDR).