I figured I could use this USB-C to USB-A cable ( AmazonBasics USB Type-C to USB-A 2.0 Male Charger Cable, 6 Feet (1.8 Meters), Black ) for it. But I wonder if I would need a HDMI port cable since my iMac doesn't have an HDMI port.
Sure, it's this one
I went through a variety of fancy, name-brand cables, each of which lasted for 2-3 months. I eventually figured since I was going to have to replace them constantly anyway to go cheap, so I bought their own 6-foot cable: https://www.amazon.com/AmazonBasics-Type-C-USB-Male-Cable/dp/B01GGKYN0A/ref=sr_1_3_0o_fs?keywords=USB-C+cable&qid=1640638752&sr=8-3
I used it for nearly two years straight. Near the very end I noticed occasionally I'd lose connection if I jarred the phone, but I got an AAWireless before I could straight up replace it.
Just get a USB A to C cable i have this one, pretty cheap and works great for sideloading
https://www.amazon.com/AmazonBasics-Type-C-USB-Male-Cable/dp/B01GGKYN0A?th=1&psc=1