Riding off-road, on any kind of bike, can improve your bike handling. You can also use other sports to improve your balance and body awareness. Skiing, skating, soccer, basketball and dance are good. Sixth, make sure your bike is in good working order . It should be reliable and fit your body well.
Crashes often happen when riders are tired and get sloppy.
They don't pay attention to what's going on around them and their reactions slow. If you find yourself fighting with the bike and riding with your head down, make a conscious effort to relax and keep your eyes up. As you improve as a racer you'll find you get better at staying alert and in control even when very tired. Your limits are not only physical, but technical and mental too. Learning and improvement come from pushing the boundaries of what you're comfortable and proficient at.