The other answer misses out an important mechanism explaining this phenomenon.
Indeed, a ring system not initially aligned with the equator of the planet will actually align to the planet's equatorial plane over time due to gravitational and collisional effects:
For a rotating planet the centrifugal effect causes it to bulge at the equator. This causes extra mass to be distributed around the equator of the planet, giving rise to a gravitational field whose potential can be approximated to high precision by:
$$
V(r, θ, ϕ) = \frac{GM}{r} +\frac{GJ_2 (1−3cos^2 θ)}{2r^3 }
$$
In this equation, ${θ}$ represents the angle between the planet's axis of rotation and a given point.${J_2}$ is a parameter describing the planet's equatorial bulge.
A derivation for this is here -
https://farside.ph.utexas.edu/teaching/336k/Newton/node108.html
The first term gives rise to the familiar inverse square law, while the second term is a "quadrupole term".
This term falls off much more rapidly with distance but gives rise to angular features of the field. In this case it causes any objects in orbits inclined relative to the equatorial plane to experience a torque.
The torque causes the orbit of particles in the ring system precess around the rotational axis of the planet; only the z-component of angular moment is conserved.
In the below diagram, the angular momentum of a particle in the ring (green arrow) rotates around the planet angular momentum vector (red arrow).
The torque and rate of orbital precession depends heavily on the semi-major axis of the orbiting particle.
This is described in detail in Chapter 2.1 - https://arxiv.org/pdf/1606.00759.pdf.
But importantly, particles which start off in orbits with similar inclinations but different semi-major axis will gradually precess into orbits with different inclinations.
These particles collide over time. These collision dissipate energy but conserve angular momentum. The effect of this is to average out the angular momenta of particles into a single plane. This is the exact same effect which causes the solar system, galaxies and ring systems to be flat in the first place. The difference here is that the quadrupole force causes the components of angular momentum which were not aligned with the planet to precess, so the collisions between particles will tend to align the ring with the planet.