A few different factors play a part. The rate you gain weight plays a big part. Steady weight gain helps your skin stretch little by little instead of super fast causing stretch marks. Also how elastic your skin is. Itching also plays a role- that's why it is recommended to use coco butter to keep the skin soft and hydrated.
Getting stretch marks is determined by the skin type as well as genetics, and the age of a woman. Genetics are involved in the sense that, if a member of your family like your mother or sister got them while pregnant, there are chances of getting them and if not, you might not get stretch marks. Studies suggest that younger pregnant women have higher chances of getting stretch marks compared to older ones.