In general, using a VPN for sports betting and gambling is legal if such an activity is allowed in your country or state. At the same time, the legality of online casinos and lotteries varies, as every country has its own laws and regulations in this regard.
You just have to stick to legal, regulated online casino sites such as BetMGM, Caesars Palace Online Casino, FanDuel, Betway, bet365 and BetRivers. They offer great casino game ranges and they will pay out quickly and without any issues if you win.