Scott Manley: Asteroids In Resonance With Jupiter:

...This video highlights 2 groups of asteroids that have orbits in resonance with Jupiter. To highlight the motion we rotate the view at the same speed as an idealized version of Jupiter, that is, we keep the rotation constant as if the planet was on a circular orbit.

The first group highlighted is in the 3:2 resonance, Objects in this group complete 3 orbits in the time that Jupiter takes to complete 2. The periodic interaction with Jupiter's gravity creates the 3 lobed pattern you see where they never come close to the giant planet. This makes their orbits more stable by protecting them from strong interactions with the planet.

The second group consists of those which have orbital periods identical to Jupiter, these are primarily found in 2 clusters around the Jovian Lagrange points. These points are 60 degrees ahead and behind Jupiter in its orbit...