Your 2010 iMac originally ran a version of Mac OS X 10.6 (Snow Leopard). You can't upgrade it past macOS 10.13.* (High Sierra). High Sierra is seven major versions behind Sequoia (the current version of macOS). Even developers who have a history of supporting old versions of macOS have abandoned it.
----------
The Target Specifications for your iMac say that it accepts DIsplayPort input.
iMac (27-inch, Mid 2010) - Technical Specifications - Apple Support
If that's all there was to it, you would just need a $20 USB-C to Mini DisplayPort adapter cable (and knowing how to turn on Target Display Mode) and you would be in business. (The Thunderbolt connecting hardware needed for the 2011 - mid 2014 iMacs is more exotic and MUCH more expensive.)
However, Apple retroactively added restrictions on the DisplayPort video source: it now must be a Mac released in 2019 or earlier, running Catalina or earlier. All current Macs are too new to qualify.