Can photos be transferred from the iphone to the mac computer automatically?

Hello,i have a question,i've been to apple store and the sales girl connected my iphone to the mac as a trial for the sync cable i was about to buy...it stayed connected for a few seconds before disconnected again.It comes to my concern if this action will transfer my photos from the iphone to the mac automatically...i hope u can help me with this issue as i am new to apple devices.Tq.
Set the phone to use iCloud photos... And your Mac to use iCloud photos... They'll show you how at the AppleStore if you need the help.
Actually,it comes to my concern if the action will transfer my photos from the iphone to the mac automatically as it was public computer...the photos were not transferred,am i right ?

Original thread: https://forums.imore.com/threads/can-photos-be-transferred-from-the-iphone-to-the-mac-computer-automatically.331965/