that was Awkward

I was at the store and this lady was talking on the phone and shopping while her toddler was hanging out in the cart. I see this little thing standing up, wobbling around. You know what I was thinking. 
I am too awkward to say anything so when she finally almost falls out of the cart I grabbed her and the mom was like "wtf" because the cart rolled when her kid fell so she tried to move but wasn't fast enough and then she just stood there and looked at me like....I don't even know.  I instantly felt bad because who wants a stranger even touching their child and here I am. 
I'm just holding her kid like "yeah" and I hand her off back to mom,  tell the mom I'm glad she's okay and just walk off because again I'm just super awkward. I couldn't just let the child fall and bust her head open though. I could've just said "hey she's about to fall"  god Why do I have to be so weird😳 
I really tried not to be judgemental because I'm not a mom and I don't know anything about that life and I'm not going to judge. whether it be with dirty looks or words to someone I don't even know about something I don't know about so idk. I just didn't want her to break her face on the tile floor. Hell the only thing I know about kids is my siblings and I know kids fall. All the time.