Real people are incredibly complex beings whose personalities are built on years and years of experiences and thoughts, not to mention societal factors, biological factors, etc.
Obviously, it would be impossible to put all that into your fictional characters, even if you’re an expert on psychology. So how, then, do you give the illusion of real complexity to a character without their traits coming off as arbitrary (at best) or nonsensical (at worst)?
The answer is scale. While you can design a character’s personality based on ALL the traits that makes a real person as complex as they are, you can pick and choose a handful of events in their life and begin to apply them to the way your character thinks, behaves, and makes decisions. Let’s look at a few examples.