why im using NVIDIA GeForce 940M 4GB lag when i playing gta5



Again, what resolution are you playing at and what frames per second are you getting? Nobody can diagnose anything with just your subjective feel of lagging to go on.
 
Try setting nvidia control panel AND windows power to maximum (instead of balanced or whatever it's set at).

Go into systray before starting game and close anything you dont have to have.

Would get another 4gb of ram if you have a free slot.