Specifically, I'm too new to help
However, a dual core/4 thread CPU from 2015 with only 4GB of RAM is fairly low-end system to try and play a game and simultaneously do video encoding, especially if you don't have a nice GPU to handle encoding. Are you saying you can stream ok now, just with lag/delay? or ?? From Task Manager/Resource Monitor, how is CPU, GPU, disk and RAM utilization?
Also, from the time you do something on the screen and it gets encoded, sent to stream provider (YouTube), re-encoded, then sent out... expect delay/lag (anywhere from 10/15 seconds if you are really luck, to 30 seconds and more.. this is normal, in my experience with live streaming (though not to YouTube, but the comments I've indicate issue is similar/same).
But I'm not a gamer, so hopefully someone can give you better advice.