Is there a word for the sum of society's law, moral value and personal beliefs?

Is there a word for the sum of society's law, moral value and personal beliefs?

a word if I do it, I can't be wrong, won't go to jail.

Like no stealing, no raping, no bullying family members,stay postive, always happy, do well at school... Anything long as it equals to what I should do


Solution 1:

The sum of society's law, moral value and personal beliefs could be called its

ethos
NOUN

The characteristic spirit of a culture, era, or community as manifested in its attitudes and aspirations.
Their projects are diverse, but the firms share a similar ethos.


Another word is

values
NOUN

Principles or standards of behaviour; one's judgement of what is important in life.
Today, principled values and beliefs are notably absent.

From Lexico.

Solution 2:

The answer could be personal ethics.

Ethics seeks to resolve questions of human morality by defining concepts such as good and evil, right and wrong, virtue and vice, justice and crime. As a field of intellectual inquiry, moral philosophy also is related to the fields of moral psychology, descriptive ethics, and value theory.