When I suspect memory, I want top to sort by it from the first screen, and not hunt for the right column later.
The -o option picks the key to sort by, in descending order. The man page describes mem as the physical memory footprint of the process:
top -o mem -n 10
-n limits the list to ten processes. A + in front of the key sorts ascending and a - sorts descending. Other keys include cpu, pid, time, rprvt (resident private size) and vsize (total memory size). Press q to quit.
If you only want a few columns, -stats takes the same key names:
top -o mem -n 10 -stats pid,command,mem
Inside a running top you can change the sort without restarting: type o, then the key name, and press Return. The summary at the top has a PhysMem line with wired, active, inactive, used and free memory, and -S adds global statistics for swap and purgeable memory.
The caveat is logging mode. With -l you get a fixed number of samples as plain text, which suits a script. The manual warns that the first sample shows an invalid %CPU for every process, because CPU is calculated from the difference with the previous sample. So top -l 1 -o mem -n 10 works for the memory columns and is useless for CPU. For a closer look at what one process is made of, the man pages for vm_stat and footprint are the places I would go next.
Further reading: top man page