Ya gotta love science. It continues to inform as it evolves.
Initial information said cock size was totally dependent upon genetics; specifically from the father.
As advances in science move forward, we get to learn new things. But it's often more accurate information. It would appear size is not all our father's doing. There are other factors in place - which is why we can have differences in size even among male siblings with the same father.
"..., while the presence of the Y chromosome leads to the development of the penis, it does not necessarily determine the characteristics of the penis, such as its length and girth, or circumference. This may be more reliant on the X chromosome, which only comes from the mother and contains around 900 genes compared with the Y chromosome’s estimated 90 genes.2
This influence from the X chromosome would then explain why some siblings’ penis sizes vary, since each sibling may differ in which X chromosome they received from their mother even if they have the same father."

So, the next time you go to either thank (or blame) the old man for the size of your cock you can also cast a sideways glance at Mom. Of course, other factors come into play; the testosterone bath in the first trimester of pregnancy and that second (typically) years-long hormone wash during puberty. And we also carry our own, individual genetic codes.
"Individual genes unique to each person (not genes from parents) can also influence penis size. Genetic mutations may contribute to penis length and appearance as well.
A number of other factors can affect penis size: hormones, nutrition, and exposure to toxins in the womb."
Hormones, particularly testosterone during puberty, affect penis growth and its final length and girth in adulthood.
But, as I continue to preach, regardless of size be proud of what you have. Barring catastrophic disaster leading to a penile transplant, it's the only one you'll get.
Love it and be proud.