لَّقَدْ كَانَ لَكُمْ فِي رَسُولِ اللَّهِ أُسْوَةٌ حَسَنَةٌ
“Indeed, in the Messenger of Allah you have an excellent example.”
This ayah sits within the same continuous Al-Ahzab passage narrating the Trench (33:9-27) -- the Qur'an's own transition, praising the Prophet ﷺ's conduct during the siege, right before the verses on the believers' steadfastness versus the hypocrites' fear.