16GB comfortably runs a hypervisor plus several containers and a small virtual machine. 32GB is the point where you stop thinking about it. RAM is the resource homelabs exhaust first, well before CPU, so buy a machine that can be upgraded rather than one that is full at purchase.