18:1-5
The disciples still have much to learn, and the next lesson is about to happen. The disciples asked Jesus “Who, then, is the greatest in the kingdom of heaven?” Why did they ask this at this point, was it because Jesus has seemed to denigrate the religious leaders, the ones who they might have assumed were the top notch in the kingdom.
Jesus tells them that they need a radically different approach. They needed to welcome people who were considered to be of no importance, and could offer no immediate benefit. So He uses the example of a little child. The disciples needed to change.
18:6-9
As well as welcoming the undervalued, they needed to be careful not to cause them to stumble. The Pharisees were very strict, and Jesus has seriously criticised them. However that did not mean that sin was not serious, and needed to be dealt with seriously. Sin is serious.
18:10-14
Sometimes the weak would wander, in such a case we are not just to write them off, but to make an effort to restore them. So he gives the parable of the lost sheep. God wants to save the lost.