@Grant's suggestion is great because you don't need to purchase anything special.
However, another option is to transfer the files to a USB3 SSD if you have an external data drive or a spare drive. This is the next best option because you can still use the SSD after the transfer is done
If you want to put the older Mac into Target Disk Mode, then you will need the following two items:
Apple USB-C to Thunderbolt 2 Adapter
Thunderbolt cable with the older style mini Displayport connectors
The last option which is what you originally asked is the least attractive option since it is unlikely you will ever use those two items again.
You never explained the purpose other than transferring files. Are you planning to use Migration Assistant or manually transfer some data files? If you want to migrate to the new Mac, then the best option would likely be to restore from a Time Machine backup, but @Grant could confirm since I don't use TM. I believe it is also possible to use Migration Assistant to perform the migration over the network, but WiFi may be very slow depending on the amount of data. I know that Setup Assistant no longer allows for selecting a Mac in Target Disk Mode (personal experience earlier this year....I could find no way to select the externally connected Mac in Target Disk Mode).
If you have a macOS user account on the new Mac because you completed Setup Assistant, then Migration Assistant may work if the old Mac is placed in Target Disk Mode.
If you don't have a backup, then you should definitely start since there are a lot of new ways to permanently lose access to your data with the newer Macs. People should always have frequent and regular backups of their computer and all external media (including the cloud) which contains important & unique data. Apple includes the Time Machine backup software for free with every copy of macOS. The only thing the user needs to do is purchase at least one USB3 drive to use for the backup (the more important the data, the more copies and/or backups you should have) and to configure Time Machine.
Back up your Mac with Time Machine - Apple Support