You can use a cable to directly connect your iPhone to a Mac with OS X 10.9 or later, or to a Windows device with Windows 7 or later.
Using the charging cable for your iPhone, connect iPhone to the USB port on your computer. If the cable isn’t compatible with the port on your computer, you’ll need to use an adapter (sold separately).
Note: If an alert appears on your iPhone asking whether to trust this computer, select Trust. See the Apple Support article Sync content or transfer files between your Mac and iPhone.
Apple Support article: About the Apple USB-C to Lightning Cable