Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Fwiw I use my late 2009 iMac in TDM mode with my M1 MBA by going usb-c to Dell D6000 Dock and then DisplayPort cable to Mini DisplayPort cable to the iMac. Works great.
What version of macOS are you running on your 2009 iMac?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.