Those both are correct but mean slightly different things.
People have dessert after dinner implies that the dessert is singular, meaning the people are eating one type of dessert.
People have desserts after dinner implies that there are multiple types of dessert that the people are eating.
Hope this helps!