Target Display Mode (TDM) was an Apple technology that allowed a small sub-set of iMac function as external monitors with the same speed as a free-standing monitor.
However, Apple began the deprecation of that feature with the Late 2014 iMacs and finished it off early this year when they removed the ability of all Macs to access an older iMac as ab external monitor. to praphrase Dr. McCoy, "It's dead, Jim."
And as Malcolm confirms, the 2011 iMac may work with a 2019 Mac or earlier, but no 2020 models. However....
The caveats:
- Even the support article (which is hard enough to interpret that even the senior contributors here don't always get it right) has been archived so Apple will not be of help.
- Before falling in love with the idea, understand that TDM is not a slam dunk. Some never get it to work on supported devices.
- A supported 2019 MacBook Pro would require cabling and adaptors costing US$60-90 and still may not work based on history here.
- And the BIG ONE: Apple will be releasing a new macOS, 'Big Sur," any day. None of us know if TDM for Macs that previously supported it will work once upgraded to Big Sur. Based on their actions earlier this year, I have an idea about what will hapen, but we are not to speculate here. 😉
Most of use who have been posting here for decades are trying to downplay TDM for most users. When it works, it's great, but you can spend a fair bit of money on cabling and still have issues. And now you have to add the uncertainty of an unreleased macOS version that could flush everything we know about TDM down the bog.
Although slower than TDM, network screen sharing is an option at least through macOS 10.15 Catalina:
Share the screen of another Mac - Apple Support