Most runners refer to this pain as "shin splints, " and it is not unusual in new runners. While it can be a sign of running “cold turkey” without much preparation, it can also be a sign of nutritional deficiency, or other medical issues.
My advice is to try walking the same route you are now trying to run, and see if the pain persists. If not, you may want to walk more to get yourself used to the repetitive motion, then gradually introduce running in small increments as you feel your legs getting stronger. This can take weeks or months, so don’t set your sights on any particular 5k yet. Wait until you can jog a few miles comfortably without this pain.
If the pain persists even when you are not running, it’s time for a checkup by your doctor. There could be a reason why you might not be cleared for competitive running yet.
Meanwhile, here is a helpful article about getting the right nutrition for strenuous exercise like running: https://www.livestrong.com/article/445056-shin-pain-caused-by-low-potassium/