Writing motivation in characters is tricky.

Just knowing what their motivations are, and writing around them is less tricky.

2 dimensional characters without motivation are easiest of all, but they don’t last.  The second and third time you draw them into the story, they start to have little lives you didn’t expect.