Do not race until you have seen a physio. I wisely missed two GNR and countless parkruns and 10ks as it has taken 7 months to get back to 60-70% strength. You don't need to do a marathon to run. You do though need to heal and strengthen to run .If you need to sate some competitive urge take up another sport as well that doesn't aggrevate your injury. I took up track cycle racing as I like cycling. Now I have another bike and another outlet for my adherance to the first rule.
Yes you have basically a grade one hamstring strain, which means you can run a bit but after a time it gets worse and you stop. It goes away after rest but the whole cycle starts again once you start running. Your healing but not strengthening. You have to begin over loading the hamstring so its starts to build up in reaction to this, its not enough that a strain heals if the point is still weak ( the Nordic Curls and the one legged bridges will do this) My hamstring went when I was doing some intervals on the track. I was interrupted and started again having cooled down with no warm up. The right one just went and the left came out in sympathy a few weeks later, though that was most likely the result of running with the left over compensating for the right. I tried for months to sort it out never getting to more than 15-20 minutes with out pain. Finally went to the physio who said it was probably bound to happen some day as the weakness was inherent in that leg, as I had felt it twinge the first time I went under 20min for a 5k but not again. He showed me the curls and bridge exercises and I started using the 7 minutes Johnson and Johnson app on my phone. So far all is good. I haven't raced but I can now do 10+ miles at a good 7:30+ pace get up and down hills and clear 20+ miles a week.
Elite runners run to win races. They train to win races. Those of us that are not elites have to find other reasons if we can't win races. I have to say that looking to running to provide a social outlet is not a good idea, cycling is better as its done in groups and not always competitively , but running is not done to take trips, you don't go on a days running to Brighton unless its a race.