Both, but they solve different problems.
With only 1GB of RAM you'll get stuttering and long loads regardless of anything else, and New Vegas wants more than that as a baseline. A low-end graphics card, meanwhile, means the game either crawls or refuses to start.
If you can only upgrade one thing, the graphics card gives the bigger visible jump in frame rate. More RAM removes the hitching, which feels better even if the average FPS barely moves.
Also worth doing for free: the game's stutter is partly an engine issue, and the community's stability patches address it better than any hardware purchase.