It doesn’t even have to be a big upfront cost, it would only be expensive if you want moderately high end games. You could play pretty much anything over 10 years old on very cheap hardware, and it would also be able to run a fair few more modern games too. Obviously more modern games its going to vary more. Some that require high specs even for minimum settings obviously won’t run.