Society is not just the community that you live in, it is all the groups of people that share the same laws, rights, and resources and live under the same flag. A small community includes the people living close to each other, in your neighborhood, these are the people that you communicate with quite often.
However, in a society people can live very far away from each other, but still, they will belong to one same society. All people in a society will not know about each other or ever communicate with each other but they all come under the banner of the same society.
People in a society can be very different from each other, they can belong to different cultures and have different languages, but as long as they share the same flag, they will remain the members of one same society. This kind of a society is considered to be diverse in a way that it brings people from different cultures together under one flag.