Sexual drive of a person is the best in teenage and youth. At 22 what you are experiencing is a good outcome of your sexual drive and physical health. Hardness of the erection shows that your erectile tissues of the penis are in good condition and are also getting fully filled at sexual arousal. So there is nothing to worry. If you are worried that such a hard penis will cause damage to your partner, rest assured, it does not happen. As age advances and you become more embroiled in earning, social life, etc, the age related arousability reduces and so do the hardness of the erections, but having said that, a firm penis is all thats needed for a good sexual relation. Rock hard penis is a good asset, but use it with care. At times when a person has very rough sex, it may make the penis liable to injury and so prevent this by enmploying a gentle attitude towards sex. Treat the partner as a person and not a slave to be domniated.
There is no medicine required for you. Hardness is okay.
But if you are experiencing very painful erections, it could be sign of a disease, and may require you to be seen by a urologist.