Layout
Layout decides how big things are and how they sit together, so your design stays tidy when it changes.
Three ways to set a size
Fixed
Stays the size you type.
Button
Hug
Shrinks to fit what is inside.
Fill
Takes all the room available.

Flex and Grid
Flex lines things up in a row or a column. Grid places them in rows and columns. Both give you a Gap between items, and they rearrange by themselves when something changes.
Group selection⌘G
Wrap in frame⌥⌘G
Ungroup⇧⌘G
Wrap in flex⇧F
Wrap in grid⇧G
Dragging into a frame
Drop a layer on a frame and it moves inside. In Flex or Grid, a line shows where it will land.
SpaceStay in the current frame
ControlPlace it freely
EscapePut it back
Questions
Why can't I add a gap?
Turn on Flex or Grid first.
Why did Fill stop working?
Resizing a layer by hand turns that side back to Fixed. Pick Fill again.
How do I place something by exact position?
Tick Absolute position, then type X and Y.