You'll need a Lightning to USB-C cable. Specifically, you want a Lightning to USB-C cable that supports USB 3 speeds — but to be honest, the transfer speed will be capped at USB 2.0 (~480 Mbps) because of the Lightning port on the XS Max, regardless of cable choice.
As for the time estimate, it depends mainly on how much data is actually stored, not just the total capacity. If your 512 GB iPhone is nearly full, you could be looking at a transfer time of 1.5 to 2.5 hours. If it's only half full, it might be closer to an hour or a bit more. Apple Store staff are usually really good at setting this up and monitoring it, and they’ll probably suggest using Quick Start wired transfer if the data load is heavy. They will perform this for you ... so you really don't need to bring a cable, but it won't hurt if you do.
There are some things you can do to reduce the amount of time required to perform the transfer. They are:
- Make sure your XS Max is updated to the latest iOS version before the transfer. (Settings → General → Software Update.)
- Delete large apps you don't use, offload old videos/photos if you already have them in iCloud Photos, and clear Safari cache. (Go to Settings → General → iPhone Storage to see what’s eating up space.)
- Make sure your iPhone XS is fully charged. Apple still prefers starting with a full battery to avoid interruptions.
- You’ll likely need to re-enter your Apple Account password during setup on the new device. Make sure you know it (or reset it ahead if needed).
- Finally, turn off Background App Refresh and temporarily disable automatic iCloud backups before starting the transfer.