How to Use Your iMac in Target Display Mode
iMac models that support target display mode were released from late 2009 to mid 2014; models with Retina displays are not supported. The iMac in target display mode must be running Mac OS X 10.6. 1 to 10.13. 6; macOS Mojave and later are not supported.