A moat is anything that keeps competitors at bay long enough for the business to compound. Hamilton Helmer's '7 Powers' enumerates the durable ones: scale economies, network effects, counter-positioning, switching costs, branding, cornered resource, and process power. Most billion-dollar companies have at least two.
Moats are easier to identify in retrospect than to engineer in advance. The strongest startup moats usually emerge from a deliberate product or distribution choice that becomes structurally hard to copy as the company scales.