Consumer surplus is an economic measurement of consumer benefits. A consumer surplus happens when the price consumers pay for a product or service is less than the price they're willing to pay. It's a measure of the additional benefit that consumers receive because they're paying less for something than what they were willing to pay
From the same website, Investopedia has an example:
For example, suppose consumers are willing to pay 50 dollars for the first unit of product A and 20 dollars for the 50th unit. If 50 of the units are sold at $20 each, then 49 of the units were sold at a consumer surplus, assuming the demand curve is constant.
It is really strange for me, it should be that only the first unit is sold at a consumer surplus because the consumer is willing to pay for $20 for the last 49 units, similar to the sold price, only the price of the first unit is different.