Can you use a VPN to bet on sports?
You can try, but the book will usually catch it, and a sportsbook that finds a VPN on your account can void your bets, keep your balance and close you down. Nearly every book's terms forbid it.
What the book checks
A regulated book has to know where you are standing when you place each bet, so its app runs a location check. It doesn't trust your IP address alone. It looks at the phone's location, the Wi-Fi networks around you and whether the connection runs through a VPN or a proxy, and it blocks the bet if anything looks wrong. VPN addresses are listed and sold to these books for exactly that reason. In practice the bet just won't go in.
An offshore book usually doesn't check as hard at the door. That's where people get into trouble, because the account opens fine and the bets get accepted, so it feels like it worked.
Where it goes wrong
The problem shows up when you ask for your money. Before a book pays a withdrawal it checks who you are: an ID, a proof of address, sometimes a bank statement (the KYC page goes through it). If the address says you live somewhere the book doesn't take bets from, or the account history shows logins from a VPN, the book has what it needs. Most terms say plainly that bets placed from a restricted place, or through a tool that hides your location, can be voided and the winnings kept.
I've seen books let a player deposit and lose for months and only read the rules the week he won. That's not a bug in the system. A player who breaks the terms has given the book a free option on every bet he makes, and books know how to use one. The voided wager page covers the other reasons a ticket gets cancelled.
What I'd do
If you're travelling and your book won't take your bet where you are, wait until you're home. If you can't bet where you live, that's a question about the law where you live, and I'm not a lawyer, so I won't pretend to answer it here. What I can tell you is how the book thinks: it will take your money on any terms, and pay it out only on its own.
Read the book's terms on location before you deposit. They're short, and they're the ones that get enforced.
Related questions
How do you bet on sports?
Pick a book you can trust to pay, deposit only what you can afford to lose, choose a game, read the price and settle your stake before you look at the payout. Placing the bet is the easy part. Deciding how much is where people go wrong.
Why did a sportsbook void my wager?
A book voids a wager when its rules say the bet should not stand. The game was postponed or cut short, a player in your prop did not play, the line was an obvious mistake, or the bet broke a house rule. A voided bet returns your stake.
What is a sportsbook?
A sportsbook is a business that takes bets on sports. It posts the prices, takes the wagers, pays the winners and keeps a cut that is built into the odds. It can be a counter in a casino, a website or an app.