Barrier

Cast (Action) (Concentration, Up to 1 Minute): You summon a transparent, hollow cube of faintly shimmering energy in a space within 12 squares of you. The cube can be Huge or smaller, and it harmlessly seals itself against any surfaces and around any obstacles that cross its boundary. If the boundary lies between a grabbed creature and its grabber, the grab ends.

The cube is weightless but fixed in place, and its faces provide total cover from attacks and spells. Once formed, no creature, object, or substance can pass through the cube's boundary, though a creature enclosed within the cube can breathe there. At your option when you cast Barrier, you can leave one or more faces of the cube incomplete.

The cube has no hit points of its own; when it takes damage, your hit points are lost instead. The cube has immunity to poison and psychic damage, and it has resistance against acid, adamant, cold, eldritch, fire, lightning, mundane, necrotic, radiant, and thunder damage (see Resistance and Vulnerability). In addition, no Fighting test can have advantage against the cube.

These rules describe a cube for the battlemap, but Barrier's in-game look can be a sphere, a dome, or a field of tessellated hexagons.