To write believable characters you need to know them the way you know real people. They MUST be products of their own past experiences and environments. This means you need to know a bunch of people and as much of their own past experiences as they’ll share. This will give you a framework for how events and environments shape people. This is something you can never master, but you’ll get better at the more people you meet and talk to. You also need to understand how what you know about people shapes your (or your character’s) interaction with them.
Let me show an example:
Setting and interaction: Main Character (MC) is standing in line at the grocery store. There are two people ahead in line. One of the customers is pleasant to the grocery clerk, the other is surly and overly hostile. Now think of how the scene changes each time as we change the knowledge/relationship the MC has about/with the grocery clerk. Think of the different things you can relay about the MC through this interaction.
Observable Knowledge: Only the details the MC can observe. The clerk’s appearance: name tag, hairstyle, non-uniform clothing items, jewelry. The clerk’s general demeanor and responses as they deal with the two customers and the MC.
[This is still a decent amount of information and allows you to show how the MC sees the world and other people. Any character that warrants mentioning their name should get at LEAST this level of information and preferably a decent in-depth thought from the MC if in 1st or 3rd limited. If you aren’t putting at least this much information about the character over the course of the story (might not be all at once) you probably shouldn’t give them a name. Personally, I’d hesitate to give them a name unless they show up in more than one scene or the MC spends a lot of time observing/internalizing about them. Giving everyone a name is how you end up with 42 named characters in 10,000 words. (*Cough*What me? Never. *Cough*) ]
Habitual Knowledge: Details gleaned over habitual interactions. The clerk is a clerk that the MC interacts with on a semi-regular basis. Nothing too personal, the clerk and MC don’t use each other’s names outside of the prescribed interaction. The MC and clerk know each other by sight and have had at least 10-20 previous interactions to this one. The MC can probably tell (and vice-versa) if the clerk is having a good or bad day even if they are being professionally polite.
Sustained Knowledge: The clerk is one that the MC has had clerk/customer interactions with for years, possibly their entire life. The MC remembers their Mom buying things from this clerk over a period of years. They still do not have a social relationship outside the customer/clerk interaction, but the relationship is as deep as it can possibly be within those confines. The clerk knows the MC’s family, job, habits.
Past Knowledge: The clerk is someone the MC went to High School with. This layers Observable Knowledge with unrelated past events. The MC and clerk may know extensively about each other’s past but have almost no knowledge of the present.
Life Knowledge: The clerk is the MC’s best friend. They have a shared past, shared present, shared secrets far beyond any clerk/costumer interaction.
Every one of those scenes would have the exact same framework but the details and interactions would all be different. It is important to not only think about the character’s past and present but how the past and present of others around them touch upon their lives both before and during the story.