Ping is a measure of internet capacity.
Lag is not JUST ping.
Ping can ONLY be caused by internet connections in any meaningful manner.
Every other type of lag, such as rendering lag or computational slowness, is due to your computer not being able to process information fast enough, or load information fast enough.
Bad PING would imply that your computer cannot RECEIVE information fast enough.
Please don't confuse them. It drives OCD tech-people insane.