Connecting windows laptop to iMac

I want to use iMac as my second screen via cable.

You can’t. The iMac doesn’t accept any video signal as input (the operating system doesn’t matter). This model iMac does not support Target Display mode.

There are a couple potential products to turn your Mac into a secondary display for another Mac

  • AirDisplay for Mac
  • Luna Display

The last product that supported connecting from a PC to a Mac as a secondary display was Air Display 2, but has since been discontinued.