Does RAM affect gaming FPS?

Somewhat, but not like other components.
RAM can impact performance in two ways:
If you dont have enough, you can get drops when it hits max capacity, but if you arent hitting max capacity, then more RAM wont change anything.
The other is RAM speed. Depending on the rest of the system, it can have some impact (Ryzen like fast RAM, intel not so much).