Using old 2008 Mac as a second monitor
Can I use my 2008 24-inch Mac as a second monitor with a 2019 MacBook Air?
MacBook Air 13", OS X 10.11
Can I use my 2008 24-inch Mac as a second monitor with a 2019 MacBook Air?
MacBook Air 13", OS X 10.11
No. Target display mode requires a 2009 to 2014 iMac.
See here: Use your iMac as a display - Apple Support
And you would not want to anyway, since the supported resolution on a 24" 2008 iMac is way lower than what the 2019 MacBook Air can output, so it would not produce the best results.
Sorry no, Target Display Mode only works with a few 27” and 21.5” model iMac’s.
for a list of compatible iMac’s refer to > Use your iMac as a display - Apple Support
Using old 2008 Mac as a second monitor