After the lots were drawn or whatever, some women from the tribe of Manesseh–Mahlah, Noah, Hoglah, Milcah, and Tirzah–came to Moses and said, hey, our father Zelophehad died on this trip and he didn’t have any sons, so we think we should get his part of our clan’s inheritance.
Moses was all, I’ll ask God. God was all, they’re right, they should get the inheritance. It should be a rule that whenever a man dies without a son, his daughter gets his stuff. If he has no kids, then his brother(s) get it; if he has not brothers, then his paternal uncle(s) get it; and if he has not paternal uncle, then whoever the nearest male relative on his father’s side gets it.
Around this time, God told Moses to climb to the top of Mount Abarim to look out over the promised land that he’d never get to go into before he died. So Moses asked God to appoint a successor to lead the people. God told Moses to appoint Joshua in front of Eleazar and all the people.