One of the key new features in macOS Monterey is the ability to AirPlay to a Mac from other Apple devices, such as an iPhone, iPad, or another Mac. According to the macOS Monterey features page, AirPlay to Mac works wirelessly. or wired using a USB cable and Apple notes that a wired connection is useful when you don't need latency or don't have access to a Wi-Fi connection.
AirPlay on Mac also allows users to extend or mirror the screen of an Apple device to a Mac and we have confirmed that it works from Mac to Mac. This allows compatible Macs to use another Mac as an external display and with AirPlay on Mac works both wirelessly and with a wired connection, Apple has come close to relaunching the target display mode, which allowed iMac models from 2009 to 2014 to serve as an external display for another Mac.
It's worth noting that these new AirPlay features don't completely replace the target display mode, as AirPlay compresses video sent from one Mac to another, and latency could be an issue.
Starting with macOS Monterey, a compatible Mac can also function as an AirPlay 2 speaker source, allowing users to wirelessly stream music or podcasts from an Apple device to a Mac or use the computer as a secondary speaker for audio on multiple bedrooms.
AirPlay on Mac works with MacBook Pro or MacBook Air 2018 or later, iMac or Mac Pro 2019 or later, iMac Pro and Mac mini 2020.
macOS Monterey is now available in developer beta, with a public beta available in July. The OS software update is likely to be available for supported Macs between late September and early November.