In very specific circumstances, a VPN can reduce ping. That is, if your internet service provider engages in bandwidth throttling, using a VPN will improve your online gaming speed.
Why? Because an ISP needs to check your traffic to see if you’re gaming and slow down your connection. A VPN encrypts your traffic, making it unreadable to the ISP. And if it doesn’t know that you’re gaming, it can’t throttle the connection!
Otherwise, a VPN can cause some lag. A VPN connection routes your data via a VPN server, and this adds another stop between your device and the game’s server. And the more steps there are, the more lag there will be. Of course, if you connect to the server nearest to your location, the lag should be negligible.