The defender is only allowed to move up and down the line as shown. The attacker can move anyway within the box to try and catch the ball.
Good team defence is five players guarding the ball, not five separate one-on-ones. The shell drill is where that starts, so here is how to teach help-side positioning and rotations from the first week of the season.
Rebounding is the least glamorous thing in basketball and one of the most decisive. It is also almost entirely a habit, which means it is entirely coachable.
Good spacing is only the start. The best modern offences teach players to attack the defence's rotations and play in a permanent 4-on-3 - here is how to coach that read.