It’s normal (and common) to have a penis that curves towards one side (or even upward or downward) when erect. There’s nothing you can do to change the way your penis bends; just realize that it’s part of what makes you unique.
However, if your penis is curved and you have bad pain when you get an erection, it’s important to contact your health care provider.