I am 22 year old. My penis is uncut and it is too small -- about 1.5 inches flaccid, and when it is erect it will go up to 4.5 inches. When it is erect, I have pain at the penis head. I have the habit of masturbation from many years. Is that a problem for my small penis?
While your penis length is smaller than average, it is in the range of normal. Normal is considered anywhere between 3 inches and 8 inches when erect. Masturbation is also something that most men do during their life at some point. See "Is masturbation unacceptable?"
What isn't normal is to have pain when you have an erection. I assume that it is because your foreskin is not completely detached from the glans (the head of the penis), and is pulling on it. This is something that should be solved; otherwise, you will find having sex with your future wife to be difficult. There are some things you can try to get your foreskin to release from the glans; see the exercise where you pull your foreskin forward. If this does not work, you should see a urologist.