Does RAM matter for FPS?
RAM starts to matter as soon as it runs out.
When a game has to process more information at once than fits into RAM, it has to use "virtual memory". That means that any data which is supposed to be in RAM is instead written to a file (the "pagefile"), and then read back when its needed. Files are a lot slower than RAM, even when you have a fast SSD. This swapping back and forth to the pagefile can become a real performance hook. Usually your operating system will move data from RAM to the pagefile which isn't needed very frequently at the moment. It will usually start with the data of programs running in the background, like any web browser windows you have still open but don't interact with right now. But when that's not enough, it might start to page data which belongs to the game and needs to be accessed every frame. As a gamer you really don't want this to happen while you are playing, because it will really bog down your framerate.
Memory is usually managed by the operating system. But when the programmers of the game are diligent, they might try to detect how much RAM they have available and make the game behave accordingly. One way is to automatically scale down or switch off features which require a lot of RAM. Like spawning fewer vehicles and pedestrians when low on RAM. Another is to change the way how a game is calculating things. There is never just one way to do something in software development, and often a programmer can choose between a solution for a specific problem which take a lot RAM but little CPU, or one which needs a lot of CPU time but a small amount of RAM. Sometimes a programmer might implement both algorithms to solve a certain problem, and then have the game choose at runtime. When there is plenty of free RAM available, it uses the fast algorithm. And when RAM is scarce, it uses the slow algorithm, because it's still faster than running with virtual memory.
But if a specific game does not already use all the RAM you have available, then upgrading to even more RAM is not going to have any perceivable effect.
When you want to know how much RAM a game is using, open the Windows task manager while the game is running (Ctrl+Shift+Esc), click on "more details", go to the "Performance" tab and take a look at the "Memory" graph. When it's constantly far below 100%, then upgrading your RAM is unlikely to improve your game experience.
By the way, the task manager can also be used in the same way to check how a game utilizes your CPU, so you can get a hint if upgrading the CPU might improve your FPS. The default task manager unfortunately does not tell you the utilization of GPU and GPU-RAM, but there are 3rd party programs from the GPU vendors which can be used to monitor these.