If you have an iPhone 11-series phone, SE (2nd generation), or later, you can update past iOS 17 to the current version of iOS, iOS 27.
If you have an iPhone XS, XS Max, or XR, you can update past iOS 17 to iOS 18.
If you have an earlier phone, you are out of luck. Your phone is too old to run apps that require iOS 17 or later. Should you wish to run such apps, you need to purchase a new phone.
Originally posted at discussions.apple.com/thread/256386507