$limit
The $limit stage in MongoDB's aggregation pipeline is used to limit the number of documents passed to the next stage in the pipeline. It provides a way to sample data and can be particularly useful for pagination, testing, or optimizing performance by reducing the amount of data that has to be processed in subsequent stages.