Naturual Sel Defense?

Is it possible to naturually know grappling defense moves if you’ve only taken boxing in your life, i mean i watch ufc but what i did today ive never really seen before.

So I was playing a game in my class where you run to bases and my friend pretendended to mess with me and pushing me off the base, and then he grabbed my shirt so i wrapped my arm around his neck and squeezed and got into a headlock, hes about 5,11 and im 5,8 so it wasn’t easy to get his head down i could have took it to the ground in an actual fight but were just friends and he tapped anyways,

Where can I possibly be learning this from?