I would recomend having a minimum of 4gb, 6-8gb being perfered for ram.
As stated numerous times though, this sounds to be more of an internet connetion issue and not your computer ram (assuming you dont have infections or processes taking up massive amounts of system resources).
I can stream youtube 1080p just fine with 2gb on my old laptop. Tablet does it with 1gb. What's the rest of the specs? And what is your internet speed?