The chapter
Simply The end of the sermon: do not judge, ask and it will be given, enter by the narrow gate, judge teachers by their fruit, and build on rock rather than sand. It closes with the crowd's reaction rather than with a summary.
Context Almost every unit here is a pair set against a pair: two eyes, two gates, two trees, two houses. The chapter argues by contrast rather than by definition, and the last contrast is the only one with weather in it.
Verses 1-6
Simply Do not judge, or you will be judged by the same measure. Take the beam out of your own eye before offering to take the speck out of your brother's.
Context The sentence is often quoted as though it forbade judgement outright, and the passage itself does not stop there: verse 5 says that once the beam is out you WILL see clearly to remove the speck, so the speck is still to come out. Verse 6, about what not to give to dogs and pigs, sits immediately after and assumes a judgement is being made. The file reports the sequence and leaves the tension where the text leaves it.
Verses 7-12
Simply Ask, seek, knock. A father does not hand his son a stone when he asks for bread. Then the rule: whatever you want people to do to you, do to them.
Context The two examples are chosen so the wrong gift LOOKS like the right one: a stone the size and colour of a loaf, a serpent where a fish was asked for. The rule at verse 12 is given a weight the surrounding sayings are not: this is the law and the prophets, which is the whole of what Matthew's readers would call scripture, summed in one sentence and stated positively as something to do rather than to avoid.
Verses 13-23
Simply The narrow gate has few who find it. False prophets come dressed as sheep. You will know them by their fruit, because a good tree cannot bear bad fruit. And saying Lord, Lord is not what gets a person in.
Context The test offered is deliberately not doctrinal. Verse 22 has people listing prophecy, exorcisms and mighty works done in his name, and the answer at 23 is not that the works were fake but that he never knew them. The measure the chapter gives for a teacher is fruit, and fruit is something visible over time rather than a claim made once.
Verses 24-29
Simply Two builders, the same rain and the same wind. One built on rock and the house stood; one built on sand and it fell. The crowds are left astonished, because he taught with authority and not like the scribes.
Context The difference is not the storm, which is identical in both, and not the house, which the text does not describe. It is the ground, and the ground stands for the same thing the whole sermon has been about: hearing these words and doing them. The closing line about the scribes is Matthew's, not his, and it is a comparison the crowd is said to have drawn.