In my opinion, it is partially predetermined. The structures of different individuals' brains are different, determined by genes to a great extent. However, our brain is pretty malleable, according to a friend of mine who is doing psychological research. For example, the amygdala is a part of our brain producing primitive desires and impulses, while the frontal lobe is another part that gives people the ability to be rational and thoughtful. In a word, the frontal lobe and the amygdala inhibit each other. The more powerful the frontal lobe one has, the better self-control this person would have. It is worth noting that the self-control ability provided by our frontal lobe includes emotion regulation, long-term planning, rational decision-making, etc., which all pertain to personalities in my view. The key is that although the frontal lobe function hinges on greatly, it is also changeable based on how we use our brain. Keeping specific practices such as meditation, mindfulness, and yoga can help shape a developed frontal lobe, which is equivalent to changing one's personality. Thus, personalities are not entirely predetermined.
(It seems I'm practicing academic writing, lol.)