This is a question that gets asked a lot, especially by people who are just getting started with GNS3. The simple answer is that the amount of RAM you need for GNS3 depends on the number of devices and virtual machines you plan on running in your lab.
If you're just starting out, then we recommend at least 4GB of RAM. This will give you enough resources to run about 20-30 devices or VMs in your GNS3 lab. If you plan on running more than that, then you'll need to increase the amount of RAM accordingly.
One thing to keep in mind is that GNS3 is very resource intensive, so even if your computer has 16GB of RAM, it might not be enough if you're planning on running a lot of devices and VMs. In general, we recommend dedicating as much RAM as possible to GNS3, especially if you're planning on running complex labs with many interconnected devices.