Set up My Photo Stream in iCloud
Your new photos appear automatically on the iOS devices, iPadOS devices, computers, and Apple TV you set up with My Photo Stream, no matter which iOS device, iPadOS device, or computer you use to take or import new photos.
On an iPhone using Photos
Go to Settings > [your name] > iCloud > Photos.
Turn on Upload to My Photo Stream.
On a Windows computer
Note: My Photo Stream is not available for newly created accounts or the iCloud for Windows app (version 10). See Keep photos up to date across devices with iCloud.