an area closed in by a firm edge: the temple's walled yard, or the ledge that runs around the altar
This is a building word, and in every place it appears it names the same kind of thing: a flat area with a firm edge shutting it in. What changes is the scale. In Chronicles it is the temple's great walled yard, fitted with its own bronze-plated doors and large enough for the king to stand in the middle of it facing the whole assembly. In Ezekiel's vision of a rebuilt temple it is the ledge that runs around the altar, a shelf about a cubit wide, measured fourteen by fourteen across its four sides.
Both uses take their name from the edge rather than from anything that happens inside. The temple yard is called an enclosure because walls and doors close it off, and the altar ledge is measured together with the rim that borders it (גְּבוּל). That is how one word can cover a yard the size of a public square and a shelf a man could walk along.
The altar ledge matters for more than measurement. Its four corners are one of the places the priest daubs blood when the altar is purified and put into service, so the word marks out a working surface in the ritual, not just an architectural detail.
English Bibles split the word along these two uses, so the same Hebrew noun comes out as "court" in Chronicles and as "ledge" or "settle" in Ezekiel. Nothing in the Hebrew signals the shift. The reader takes the scale from whatever is being described.