Clean the snap ring and the groove and see if the ring will seat in the groove if inserted OD of the ring into the groove.
If it will then the ring is the right size.
then look at the ring. Most are stamped and have a side that is slightly rounded and a side with a slightly sharp edge where it was stamped.
Install the ring with the sharp edge away from the part being retained.
If installed the other way around it will sometimes pop out if the groove.
Sometimes it might be a tight fit, especially if it is dirty, and takes a little tapping in with a small punch to seat the ring.
Sometimes we take some safety wire and tie up the holes on the ends to keep them from spreading, but that is usually not necessary if the ring is installed with that sharp edge on the outside.