I haven't had issues with hamstrings until recently myself - been running for longer than you.
If it were me - I'd not run until the tightness is gone. Then start back at a lower mileage and slow pace and build back up. (When I say "if it were me" - that's exactly where I'm at. Pulled hamstring last month, just now building mileage again.)
I've seen exercises online that are supposed to build hamstring strength and stretch it - squats, for example.
One thing to keep in mind - in a study I read, it indicated that warming up is more important than stretching when it comes to running injuries. So - start every run with a slow warmup before hitting your normal pace. Maybe even a short warm up followed by some light stretching before the run.
Good luck!