You need to make sure of a few things if you cannot install the latest iOS version: check if your iPhone is compatible, has more than 50% battery, and is connected to a stable internet/Wi-Fi connection. If the issue is still there, you can check out the detailed guide on the same.