He brought his right knee up, isolated Ngannou's leg on his quad like a shelf, then threw his opposite instep in to the thigh to sit back for the heel hook all on his own. That is a literal step by step of how beginners learn to go for them, and he executed it like the novice grappler that he is.
You can make the argument that Ngannou baited him and let his feet hang out there to encourage that so he could counter by sitting up. That's plausible, but unlikely. Gane was the one who made the decision to set that up and give away top position though. Ngannou simply took the gift that was given to him.