Creating a primitive
Take a look at the primitive section.
Generally speaking build123d has two modes of operation which also can be mixed together.
One mode is algebra mode wich is similar to what OpenScad is using. The second one which I will be mostly using for now is builder mode.
See also:
Key Concepts (builder mode) — build123d 0.5.1.dev45+gaf4e729 documentation
Key Concepts (algebra mode) — build123d 0.5.1.dev45+gaf4e729 documentation
Builders — build123d 0.5.1.dev45+gaf4e729 documentation)
Build123 deviates a bit from what you are probably used in OpenScad that it also works more like "regular" CAD designing. It is often a good idea (also performance wise) to create a 2D sketch and extrude it.
Still build123 leaves it up to you what and how you are going to do anything.
Neat! :)