In general (excluding major trauma) — personality is almost all genetic.
The best recent estimates are that personality differences are about two-thirds due to genetic differences and almost not at all due to differences in early household environment. This means that if two people have identical genes, they’ll likely have rather similar personalities even if they’re raised in different households. Also, if two people have entirely different genes, they’ll have quite different personalities even if they’re raised in the same household.
The H Factor of Personality