The answer is the ego operates on the reality principle. It is
the capacity of the mind to evaluate the reality of the external
world, and to act upon it accordingly, as opposed to acting on the
pleasure principle. The ego, on the other hand, is the factor of
personality that deals with the stresses of reality.