Could I use my iMac 2010 (mini-DisplayPort) and Windows 10 as a second monitor for my Mac laptops? I have an iMac 21.5" Mid 2010 that has a miniDisplayPort on the back.  Is there any way to connect a Mac laptop (either a mac with Thunderbolt 1 or 2 or 3 port or a Macbook 12” with USB-C  port) with a cable (such as a MiniDisplayPort to MiniDisplayPort Cable) to my iMac that uses Windows 10 (not Parallels, just Windows 10).

I’d use this to use my iMac as an external display for troubleshooting Macs that have display issues.

Any help much appreciated.
No, it cannot be done while the iMac is running Windows 10 natively.

The feature you're looking for is called "Target Display Mode". It only works when the iMac is booted into macOS.

You can read all about how the feature works and its requirements here:

https://support.apple.com/el-gr/HT204592#requirements