There is no surefire way to stop falling off your skateboard, but there are a few things you can do to make the fall less harmful.
Position Yourself Correctly: One of the first things you can do to avoid falling off your skateboard is to position yourself properly. Make sure that you are standing on the deck with both feet solidly planted on the ground, and your weight evenly distributed across both feet. This will help prevent you from losing balance and sliding off the board.
Practice Stopping On a Skateboard: Another thing that you can do to improve your chances of controlling your fall when skating is to practice stopping on a skateboard. When learning how to stop, focus on applying brakes just before you reach the ground, instead of trying to catch yourself in midair. This will help distribute your weight more evenly and reduce the impact when you hit the ground.