You replace the RAM in that model since it's one slot.
Read https://www.crucial.com/compatible-upgrade-for/lenovo/ideacentre-310s-08iap
As to games, https://forum.pcmech.com/threads/upgrading-a-lenovo.242305/ and others seems to say it runs. The gamers I know would not accept its performance.
hello
I have an IdeaCentre 310s it has 4gb of ram is it possible to add ram to play pc games on it, it does work with apex legends and its new.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic