This article will teach you how to automatically upload new photos taken on an iPhone to an iCloud account by enabling "iCloud Photo Library" or "Photo Sharing".
Steps

Step 1. Open the "Settings" app on the iPhone
It has a gray gear icon and is on one of the home screens.
It may also be locating in the "Utilities" folder

Step 2. Scroll down and tap iCloud
This option is in the fourth set of options.

Step 3. Sign in to your iCloud account (if necessary)
- Enter your Apple ID and password.
- Tap Sign In.

Step 4. Tap Photos

Step 5. Slide the iCloud Photo Library switch to the "On" position
Doing so will automatically upload your entire library of photos (and videos) while syncing with iCloud.
- you can choose between Optimize on iPhone or Download and keep originals. The first option prioritizes iCloud over local storage to save space, while the second option keeps a copy of the original content on the iPhone.
- The "iCloud Photo Library" uses iCloud storage space. You can store any number of photos as long as you have available space.
- Now your photo library can be accessed via the "Photos" app on your iPhone, iPad or Mac. You can also access it from a web browser by opening the section Photos from the website www.icloud.com.

Step 6. Slide the My Photo Sharing switch to the "On" position
Doing so will automatically send recent photos to all devices using iCloud when connecting to a Wi-Fi network.
- The "My Photo Sharing" not uses iCloud storage space.
- You can only store the 1,000 most recent photos with "Photo Sharing". Photos beyond this number will be removed from "Photo Sharing".
- This feature does not support videos.
- Also, it can reduce the quality of photos to conserve internet bandwidth.
Tips
- You can use one or both options simultaneously. They have similar purposes but work differently.
- If you want to save iCloud storage space, just use "My Photo Sharing". The "iCloud Photo Library" backs up the photos included in "My Photo Share", thus negating some of the storage space advantages of this feature.