The amount of RAM doesn’t tell you anything about "the best value". Bad software with a large amount of RAM provides less value than highly-optimized one with a lower amount of RAM, for example.
This was the whole advantage of the iPhone at the beginning: not a lot of RAM (meaning less energy needed) but a highly-optimized OS that works well even with that constrained environment.
It tells you a lot about the best value. It certainly doesn't tell you everything, and you might well pick a more expensive phone with less ram for other reasons, but all else being equal a phone with more ram will be better.