Hi
Thanks for reaching out to Apple Support Communities. It sounds like you have a question about using your iMac as a second display. We're happy to provide some information to assist.
Full details can be found in the article here: Use your iMac as a display with target display mode
Specifically, the section that states the requirements for cables needed:
"The following older iMac models can be used as an external display when plugged into another older Mac model.
To use any of these iMac models as an external display:
- The iMac used as a display must have macOS High Sierra or earlier installed.
- The other Mac that you're connecting it to must have been introduced in 2019 or earlier and have macOS Catalina or earlier installed.
- The cable connecting the two Mac computers must be a Thunderbolt or Thunderbolt 2 cable.
To use any of these iMac models as an external display:
- The iMac used as a display must have macOS High Sierra or earlier installed.
- The other Mac that you're connecting it to must have been introduced in 2019 or earlier and have macOS Catalina or earlier installed.
- The cable connecting the two Mac computers must be a Mini DisplayPort cable.
Best!