I also like to do this to fake out defenders. It’s almost like doing a head fake without moving your head very much. Glance up at the rim as if you’re about to load your shot, get your defender to close distance to you, and then as they close to you, drive around them.
A big part of it is plyo workouts. Try squatting jumps, box jumps, pogos, and also do regular leg workouts with calf raises, barbell squats, etc. But I think another thing that might work is just actually jumping. Find a spot on a wall in your house and continuously try to reach for it until your legs give out.