Specifically, these are all of the iPhones currently expected to support iOS 18 when the update inevitably comes out sometime in the fall:
If all this pans out, there’s clearly a very good chance the iPhone SE 2 and iPhone 11 roster will be compatible with next year’s iOS 19 as well, which is unlikely to be the case for the iPhone XR, XS, and XS Max.
The Apple A10 Fusion-based iPad 9.7 from 2018 and iPad 10.2 from 2019 are also unlikely to be found on the compatibility list of the iPadOS 18, while 2020 and later editions alongside iPad Airs and iPad minis released in 2019 and later should have no problem running the next OS build.