The context will determine the meaning for each instance.
Of course
Who is being referred to here?
Isa 11:1 And there shall come forth a rod out of the stem of Jesse, and a Branch shall grow out of his roots:
Isa 11:2 And the spirit of the LORD shall rest upon him, the spirit of wisdom and understanding, the spirit of counsel and might, the spirit of knowledge and of the fear of the LORD;
In other versions of the bible "the stump of Jesse" is used.
How many times does Jesus refer to a "vine" and to "branches"?
Ezekiel speaking about Tyre to the prince of Tyrus.
Eze 28:1
The word of the LORD came again unto me, saying,
Eze 28:2 Son of man, say unto the prince of Tyrus, Thus saith the Lord GOD; Because thine heart is lifted up, and thou hast said, I am a God, I sit in the seat of God, in the midst of the seas;
yet thou art a man, and not God, though
thou set thine heart as the heart of God:
Eze 28:7 Behold, therefore I will bring
strangers upon thee, the terrible of the nations: and they shall draw their swords against the beauty of thy wisdom, and they shall defile thy brightness.
Strangers - Babylonians
Eze 28:9 Wilt thou yet say before him that slayeth thee, I am God? but thou shalt be a man, and no God, in the hand of him that slayeth thee.
Ezekiel speaking to the Pharaoh King of Egypt.
Eze 30:20 And it came to pass in the eleventh year, in the first month, in the seventh day of the month, that the word of the LORD came unto me, saying,
Eze 30:21 Son of man, I have broken the arm of Pharaoh king of Egypt; and, lo, it shall not be bound up to be healed, to put a roller to bind it, to make it strong to hold the sword.
Pharaoh had attempted to help the King of Assyria against the onslaught of the Babylonians. It didn't work. The Babylonians destroyed the Assyrians never-the-less.
Eze 31:1 And it came to pass in the eleventh year, in the third month, in the first day of the month, that the word of the LORD came unto me, saying,
Eze 31:2 Son of man, speak unto Pharaoh king of Egypt, and to his multitude; Whom art thou like in thy greatness?
Eze 31:3 Behold, the Assyrian was a
cedar in Lebanon with fair branches, and with a shadowing shroud, and of an high stature; and his top was among the thick boughs.
Assyria was made great by following God.
Eze 31:4 The waters made him great, the deep set him up on high with her rivers running round about his plants, and sent out her little rivers unto all the trees of the field.
Eze 31:5 Therefore his height was exalted above all the trees of the field, and his boughs were multiplied, and his branches became long because of the multitude of waters, when he shot forth.
"that were in the garden of God, envied him.
"
Reference to pride in the Garden of Eden, the fall of Adam.
The Assyrian King's pride in what God had done with Assyria claiming himself (the king) to be a god was his downfall. Other nations that became prosperous due to Assyrian greatness envied the Assyrian nation.
Eze 31:8 The cedars in the garden of God could not hide him: the fir trees were not like his boughs, and the chesnut trees were not like his branches; nor any tree in the garden of God was like unto him in his beauty.
Eze 31:9 I have made him fair by the multitude of his branches: so that all the trees of Eden, that were in the garden of God, envied him.
God uses the Babylonians for judgment against the King.
Eze 31:10 Therefore thus saith the Lord GOD; Because thou hast lifted up thyself in height, and he hath shot up his top among the thick boughs, and his heart is lifted up in his height;
Eze 31:11 I have therefore delivered him into the hand of the mighty one of the heathen; he shall surely deal with him: I have driven him out for his wickedness.
Again, God uses "the heathen", the Babylonians to exact His judgment against a prideful King (Pharoah) and the nation.
Eze 31:18 To whom art thou thus like in glory and in greatness among the trees of Eden? yet shalt thou be brought down with the trees of Eden unto the nether parts of the earth: thou shalt lie in the midst of the uncircumcised with them that be slain by the sword. This is Pharaoh and all his multitude, saith the Lord GOD.
Eze 32:11 For thus saith the Lord GOD; The sword of the king of Babylon shall come upon thee.
Eze 32:12 By the swords of the mighty will I cause thy multitude to fall, the terrible of the nations, all of them: and they shall spoil the pomp of Egypt, and all the multitude thereof shall be destroyed.
The use of trees in Ezekiel 28 through 32 is completely allegorical.