The plan is made clear in the previous episode. The idea was to have Bran lightly defended with others close by, so that when the Night King comes to him, they can rush in and attack the Night King.
Jaime: So, what can we do?
Jon: The Night King made them all. They follow his command. If he falls. Getting to him may be our best chance.
Jaime: If that's true, he'll never expose himself.
Bran: Yes, he will. He'll come for me.
Jon: We'll put you in the crypt, where it's safest.
Bran: No. We need to lure him into the open before his army destroys us all. I'll wait for him in the Godswood.
Sansa: You want us to use you as bait? We're not leaving you alone out there.
Theon: He won't be. I'll stay with him. With the Ironborn.
Jon: We need to be near him. Not too near, or the Night King won't come. But close enough to pursue him when he does.
Game of Thrones, Season 8 Episode 2, "A Knight of the Seven Kingdoms"