Memory holds the applications and working data a computer needs immediately. Too little causes slow switching, repeated loading and pressure on storage; more than the workload can use brings little benefit.
Begin with the actual work. Email, browser-based administration and ordinary documents need less than large creative files, engineering models, software development, virtual machines or substantial data analysis. Count the applications used together, not only the most demanding one in isolation.
Check the software supplier’s current requirements, then leave sensible room for operating-system changes and a few years of use. Also check whether the memory can be upgraded later: some compact machines have it permanently attached, making the initial decision more important.
Do not choose RAM alone. Processor, storage, graphics, cooling, display and warranty can be equally important. A balanced specification built around representative tasks is more useful than a machine with one impressive headline number.