Not sure this is even a question, pretty basic stuff here.

A typical shelter has a wide opening and three closed in sides and a pitched roof. A modest sized shelter of 10' x 12' would have floor space of approximately 120 square feet, add a 10' ceiling height and the cubic foot space is approximately 1,200 cubic feet. A two-person tent of 32 square feet of floor space and height of 4' (no reduction allowance for tapers) would be approximately 128 cubic feet. Right there the space of a tent being many times smaller than a shelter will be warmer with even a small amount of cast-off body heat.

There are a lot of major factors beyond the internal cubic footage of a shelter vs tent that makes the warmth comparison rather easy.

Wind is difficult if not impossible to mitigate in a shelter, removing any bit of heat build up in a shelter (even with make-shift closures using tarps) whereon tents can mitigate wind entry to a large extent, some completely eliminate this factor.

Most shelters will likely be open to wind and cold temperatures under a simple wooden floor. In cold weather conditions, wood is not a great insulator as any warmth it receives from body heat is quickly pulled away by exposure alone. Sleeping pads of various types can mitigate this to some degree, though their performance is limited by the exposed floor under the pad. Tents placed on the ground or packed snow do not have open space under them, allowing sleeping pads to work more effectively.

Though shelters tend to be positioned so the open side is opposite the prevailing winds, stormy weather can defeat this positioning fairly easily allowing wind to blow directly into or capture wind in periodic eddies that wash through the shelter carrying snow, rain, or drizzle onto occupants, keeping gear and people wet and colder than in tents with zippered entry.

There are, to be sure, many nuances regarding communal use shelters outside of cold weather comparisons with tents, however the question was not if a tent was better than a shelter, but which would be warmer on a cold night. Clearly the tent being the smaller space would capture and retain more heat than an open shelter. Though this typically will be a 5 to 10-degree differential, warmer is warmer.