The social contract theory is one of the major options in modern moral philosophy, along with utilitarianism, Kant’s moral philosophy, and virtue ethics.
We are all basically self-interested creatures who want to live well; but in order to flourish, we need a peaceful, cooperative social order. We cannot have one without moral rules. Morality consists of the rules we need to follow in order to get the benefits of social living