There are two main theories about the origin of Saturn’s rings.
1) A satellite of Saturn’s orbit shrinks and eventually reaches the Roche limit, causing Saturn’s tidal force to scatter and orbit Saturn’s.
The gravitational pull of the planet facing the moon facing it is greater than the gravity on the opposite side, causing the moon to scatter and orbit the planet.)
2) In the early days of the Solar System, there was a lot of dust and small objects. Such objects are caught in Saturn’s gravity as a result of Jupiter’s motion and then orbit Saturn.