iPhones have both regular memory (RAM) and storage (in flash memory). Apple doesn't typically advertise how much RAM an iPhone has – but the amount sometimes matters. E.g., Apple Intelligence is only available for the iPhone 15 Pro, 15 Pro Max, and 16-series phones – all of which have 8 GB of RAM, more than any other iPhone.
The iPhone 14, 15, and 16 series phones all come with a minimum of 128 GB of storage. The third-generation SE comes with a minimum of 64 GB. So even though future iOS updates might consume more storage than iOS 18 does, I'm guessing they're not going to suddenly bloat up to make a 256 GB phone unusable.