I think you might be confusing two things. iOS developers
build against a particular SDK, but they specify a
deployment target which is an OS version. You can build against the latest or near-latest SDK (in fact Apple requires you to), while still targeting arbitrarily old OS versions. The developer changes these independently.
Developers can easily use APIs introduced after their deployment target OS. So if you want to target iOS 15, but use APIs introduced in iOS 17, you can easily do this with a runtime check.
Many iOS developers choose to increase their deployment target, which accomplishes nothing for the user besides locking out older devices, while making the developer's life more comfortable (he can abandon those runtime checks and code paths that only run on older devices).
But if you are disciplined and care about your users on old devices, you can very easily target those old devices while still using the latest and greatest OS features on devices that have them.