Old iMac as Second Monitor with MacBook Pro

Has anyone had any success using an older iMac (2013) as a second monitor with the most recent MacBook Pro? I understand that using a Thunderbolt cable with Target Display mode may work but wanted to make sure that 1) it works and, 2) get the right type of Thunderbolt cable to match up to both computers.

Thanks in advance!
Hopefully, someone who has done this will reply soon...🙂

Original thread: https://forums.imore.com/threads/old-imac-as-second-monitor-with-macbook-pro.431085/