You Can AirPlay from One Mac to Another to Use it As External Display
Apple’s new macOS Monterey allows users to AirPlay content from a Mac to an iPhone, iPad, or even another Mac, which makes it possible to use the second Mac as a wireless external display. Apple, however, recommends a wired connection for this purpose to avoid latency issues (via MacRumors).
Apple’s macOS Monterey preview page notes that newer Macs running the latest macOS can use AirPlay to send content to other Macs. Moreover, AirPlay works both wirelessly and wired using USB. “A wired connection is useful when you want to ensure that there’s no latency or you don’t have access to Wi-Fi,” notes Apple.
When you send content from your iPhone or iPad to your Mac, you can choose to mirror your iPhone or iPad or extend its display by using a Mac as a secondary display for apps that support it, such as Keynote and Photos.
View videos, edit Keynote presentations, and hear music on your Mac as it’s being played from your other device. Your Mac works with any Apple device, and it’s even easier to connect if the devices share the same Apple ID.
Supported Macs running macOS Monterey 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 multi-room audio.