Use iMac 27" in Target Display Mode with Raspberry Pi - Ask Different
Use your iMac as a display with target display mode - Apple Support
Incase anyone ever needs the answer…I have a 27” 2010 iMac working in Target Display Mode with a M1 MacBook Pro using a miniDP to USB C adaptor that's capable of 4k60Hz.