Airplay 2 MacBook, Use an Old MacBook as a wireless display thanks 2 OCLP, Works on any Year MacBook - YouTube
Identify your iMac model - Apple Support
Use your iMac as a display with target display mode - Apple Support
Pardon me but the new display made the old iMac a steal. Despite the speakers, camera, ports and extra 100 nits brightness. You get a fully working Mac for $200 extra, heck... :
How to stream video from your Mac to your TV, with or without Apple TV | iMore