I would study the internal volume, shape and weight characteristics of the payload bay of the starship. It is freely available on the Space X website.
A Cube or rectangular configuration would fit depending on its size, however there would be a lot of unused space. Cubes also do not have very good performance as pressure vessels - with corners being weak points.
An alternative, much like some modules of the ISS, is to have a cylinder pressurised vessel, within which a cube/ rectangular prism can be placed for purposes of ease of circulation and instrumentation panels / modularity.
I think a better outcome would actually be the creation of a small O'Neill Cylinder using the Starship. I did a study on how it could work and you could get workable, pressurised cylinder diameters with gravity if spun without coriolis effects if the module inside was expanded and inflatable.
You could then send 2 Starships to fill with air, water and other required instrumentation to fill it. Once completed, astronauts / visitors would have comfortable and healthy gravity to enable long duration stays, and the craft can be utilised for a variety of purposes, such as space station research, travel to mars or beyond, and or other uses like tourism, residential purposes or commercial ones.