Going back to the 2007, Apple doesn’t reveal the amount of RAM for the iPhone in their marketing.
Occasionally there’s a feature that requires a minimum amount of RAM like Apple Intelligence but that’s the exception.