There are factors that make some children more predisposed to nursemaid’s elbow.
https://www.chla.org/blog/rehab-therapies-and-audiology/nursemaid-elbow-101-causes-symptoms-and-treatment
An urgent care doctor told me that if it happens repeatedly, it’s better to fix it right away yourself than to prolong the pain by taking your child to a doctor. There are videos on YouTube. One of my kids only had it happen once, but the other is super, super flexible, so it happened quite a few times to her, and the more often it happens, the easier it happens. She didn’t outgrow it by age 5 like most kids do so our pediatrician sent us to an orthopedist. The ortho said that she would outgrow it, but she just hadn’t yet. He taught her a method to fix it herself if it happened at school. She was to extend her arm fully, straight out in front of her body, palm up, then bend at the elbow, bringing her hand toward her shoulder.
The important thing to know is that if you need to take your child by the arm (they start to fall or are about to step into traffic or you’re trying to help them up out of a seated position on the floor), you need to take hold of the upper arm rather than the lower portion of the arm or the hand so you’re not applying any force to the elbow.