upgrade iphone 4 to latest iOS as 9 or 10
If you check the iOS Support Matrix, you will see that the latest version of iOS that supports the iPhone 4 is iOS 7.

You can't upgrade to a version of iOS greater than that - so iOS 8, 9, 10, 11, or the upcoming 12, are all out of reach for that phone.