First of all remove all myths & misconceptions from your mind about masturbation
In fact, Masturbation is completely normal & doesn't have any bad effect to the body and mind
All those concepts that masturbation leads to stunted growth
Height of an individual is determined by Genetics, Environmental & Nutritional factors and Hormonal factors (most important the Growth Hormone
secreted by pituitary gland
An individual stops growing in height after the fusion of the Epiphyses (growth plates) of the long bones, which occurs by the age of 19-21 yrs in males.
So...you may still have a chance of achieving your dream height, as you are just 18 yrs old now.
Make sure that you are taking a healthy & balanced diet, exercise regularly & avoid stress.
One more thing...avoid consuming any over the counter medication
which claim to increase height...it may be harmful.
Wishing you Good Health.
Thanks and take care