I wish they still had target display mode. Then I could connect my work laptop to a “home” iMac. Was a good setup when I could use my iMac as a gaming computer back in the x86 days.
While not as versatile as Target Display Mode, you can use AirPlay over a wired connection from Mac to Mac: https://www.macrumors.com/2021/06/09/airplay-mac-to-mac-exte...
Weird it's still called AirPlay, but at least it's possible. The video will be compressed, though unlike Target Display Mode