Try these troubleshooting tips...
This is by no means an exhaustive list for the cause of pain when you're running. But it's a good starting place. Watch the video or read the list below and figure out which category you might fit into.
Read "Power, Speed, Endurance." Research the Pose Method for running. Hire a coach. If you're not going to do this then...
Don't step out too far ahead of yourself or lean back or slap your heels down hard and heavy. You should be stepping beneath or slightly behind your body (depending on pace), landing mid-foot / forefoot, and have a slight forward lean (again depending on pace), keep your head looking out to the horizon and minimize rotating too much throughthe hips / torso.
Find a physio. Get some advice. Do the rehab. Fix the injury. Don't pick the scab (make the injury worse).
Biting off more than you can chew (distance and / or speed)
Drop distance back to manageable amount. Build slowly. Put on self-limiting protocols i.e. nasal breathing, hill running, avoid heavy heel striking etc.
Not strong / stable enough
Strengthen the foot, lower limb and hips with things like bent leg calf raises, calf raises, skipping, crab walks, hip abductions, single leg work, glute and hamstring work, spend time barefoot, and so on.
REMEMBER - DON'T PICK THE SCAB
Don't make the injury worse. If running is hurting it. Stop running and seek the help of an expert aka a physio. Get pointed in the right direction and then actually do the work to fix it.
Coaching tip: Run hills instead of flats. This teaches proper positioning as it naturally puts you into better running shape and limits how fast and how far you can run. There's also less impact on the bones / joints.
If you decide to do hill running... run up the hill, walk back down, and repeat. Don't run back down to begin. You’ll have to build to that.