You'll be wanting to read
this thread - 14 pages of people recording and examining these so-called "shepherd moons".
As I understand it, rings form in ED when one of two things happen:
- Stellar Forge creates moons that are too close to the planet. Forge algorithms then turn those moons into rings.
- The pseudo-history generated for the system has a rare cataclysmic event (cometary impact, passing black hole, etc) destroying a moon. Forge algorithms create a debris ring where the moon used to be.
The first type of rings are, naturally, far more common. And only the second type of ring can generate a system where there are moons orbiting closer to the planet than the ring.