For me it was probably partly genetics. With that said i have no doubt i would have grown taller than i am now if not for a few other factors:
I come from a poor country where the food is scarce, my parents where starving, which is especially bad for the mother during pregnancy, that thing affects how big and strong the baby gets. I was born 2 weeks earlier than i should have as a result of that, and only weighed about 2 kilos which is very small, and i had several sicknesses during that part of my life.
Then being adopted and growing up being dark skinned in sweden where there is very little sunlight, i most likely was vitamin D deficient during most of my childhood, and i didnt eat much either and had big problems with sleep.
Despite growing up in a poor country, my biological dad was about 1.80 cm tall (i know this since i ahve a full body picture of him with my adoptive dad, both barefoot and the same height, and i know for a fact that my adoptive dad is 180)
My biological mother was probably quite short tough, dont have any accurate idea of her exact height though.